tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robbin...@apache.org
Subject svn commit: r412355 - in /incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo: SDOString.cpp SDOString.h
Date Wed, 07 Jun 2006 10:15:34 GMT
Author: robbinspg
Date: Wed Jun  7 03:15:34 2006
New Revision: 412355

URL: http://svn.apache.org/viewvc?rev=412355&view=rev
Log:
TUSCANY-455 - correct inline methods

Modified:
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.cpp
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.h

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.cpp?rev=412355&r1=412354&r2=412355&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.cpp Wed Jun  7 03:15:34
2006
@@ -1,6 +1,6 @@
 /*
  *
- *  *** GMW *** Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-/* *** GMW *** $Rev$ $Date$ */
+/* $Rev$ $Date$ */
 
 // This class probably needs to inherit from RefCountingObject to ensure that objects of
this type get cleaned up correctly.
 
@@ -34,41 +34,6 @@
 {
   namespace sdo
   {
-    inline SDOString::SDOString(const std::string& str)
-      : std_string(str)
-    {
-    }
-
-    inline SDOString::~SDOString()
-    {
-
-    }
-
-    inline SDOString SDOString::substr(size_t i, size_t n) const
-    {
-      return SDOString(substr(i, n));
-    }
-
-//     inline SDOString::SDOString(const std::string& str, size_t pos)
-//       : std_string(str, pos)
-//     {
-//     }
-
-    inline SDOString::SDOString(const std::string& str, size_t pos, size_t n)
-      : std_string(str, pos, n)
-    {
-    }
-
-    inline SDOString::SDOString(const char* str)
-      : std_string(str)
-    {
-    }
-
-    inline SDOString::SDOString()
-      : std_string()
-    {
-    }
-
     SDOString SDOString::toLower(unsigned int start, unsigned int length)
     {
       std::string result_string;

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.h?rev=412355&r1=412354&r2=412355&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOString.h Wed Jun  7 03:15:34
2006
@@ -1,6 +1,6 @@
 /*
  *
- *  *** GMW *** Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-/* *** GMW *** $Rev$ $Date$ */
+/* $Rev$ $Date$ */
 
 // #include "commonj/sdo/disable_warn.h"
 
@@ -23,8 +23,8 @@
 #define _SDOString_H_
 #include "commonj/sdo/export.h"
 
-// #include <libxml/xmlstring.h>
 #include <iostream>
+using std::string;
 
 namespace commonj
 {
@@ -36,19 +36,23 @@
     * replace it with a more NLS friendly version later.
     */
             
-      class SDOString : public std::string
+      class SDOString : public string
       {
       public:
-        SDO_API SDOString substr(size_t i = 0, size_t n = std::string::npos) const;
+        SDO_API SDOString substr(size_t i = 0, size_t n = std::string::npos) const
+        {
+            return SDOString(substr(i, n));
+        }
 
         SDO_API SDOString toLower(unsigned int start = 0,
                                   unsigned int length = 0);
-        SDO_API SDOString(const std::string& str);
+        SDO_API SDOString(const string& str) : string(str) {}
         //        SDO_SPI SDOString(const std::string& str, size_t pos);
-        SDO_API SDOString(const std::string& str, size_t pos, size_t n = std::string::npos);
-        SDO_API SDOString(const char* str);
-        SDO_API SDOString();
-        SDO_API ~SDOString();
+        SDO_API SDOString(const std::string& str, size_t pos, size_t n = std::string::npos)
+            : string(str, pos, n) {}
+        SDO_API SDOString(const char* str) : string(str) {}
+        SDO_API SDOString() : string() {}
+        SDO_API virtual ~SDOString() {}
 
 
         // User defined conversion so that the compiler will automatically convert SDOString
to const char *



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message