Salome HOME
make same as in V5_1_main
authoreap <eap@opencascade.com>
Tue, 3 Mar 2009 09:00:32 +0000 (09:00 +0000)
committereap <eap@opencascade.com>
Tue, 3 Mar 2009 09:00:32 +0000 (09:00 +0000)
+  operator char*() const {
+    return (char*)c_str();
+  }

src/SMESH/SMESH_Comment.hxx

index d7173cf82f903f9ff33448e0b90ec548cde7313f..d1d32b9e68e24efc769dbfd555039e03bf4e92c8 100644 (file)
 # include <string>
 # include <sstream>
 
+using namespace std;
+
 /*!
  * \brief Class to generate string from any type
  */
-class SMESH_Comment : public std::string
+class SMESH_Comment : public string
 {
-  std::ostringstream _s ;
+  ostringstream _s ;
 
 public :
 
-  SMESH_Comment(): std::string("") {}
+  SMESH_Comment():string("") {}
 
-  SMESH_Comment(const SMESH_Comment& c): std::string() {
+  SMESH_Comment(const SMESH_Comment& c):string() {
     _s << c.c_str() ;
-    this->std::string::operator=( _s.str() );
+    this->string::operator=( _s.str() );
   }
 
   template <class T>
   SMESH_Comment( const T &anything ) {
     _s << anything ;
-    this->std::string::operator=( _s.str() );
+    this->string::operator=( _s.str() );
   }
 
   template <class T>
   SMESH_Comment & operator<<( const T &anything ) {
     _s << anything ;
-    this->std::string::operator=( _s.str() );
+    this->string::operator=( _s.str() );
     return *this ;
   }
+
+  operator char*() const {
+    return (char*)c_str();
+  }
 };