]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Reverting to previous impl. of ICoCoField for compatibility with Cathare. abn/icoco_fix
authorabn <adrien.bruneton@cea.fr>
Thu, 20 Nov 2014 08:08:23 +0000 (09:08 +0100)
committerabn <adrien.bruneton@cea.fr>
Thu, 20 Nov 2014 08:08:23 +0000 (09:08 +0100)
src/ParaMEDMEM/ICoCoField.cxx
src/ParaMEDMEM/ICoCoField.hxx

index 3db974ef66d22323f0b002022e8b218b2ba5896f..38d58e7f6f281f939e1dc8cf5bddd41699f5d431 100644 (file)
 using namespace ICoCo;
 using std::string;
 
-Field::Field()
-{
+Field::Field() {
+  _name=new string;
 }
 
-Field::~Field()
-{
+Field::~Field() {
+  delete _name;
 }
 
-void Field::setName(const string& name)
-{
-  _name=name;
+void Field::setName(const string& name) {
+  *_name=name;
 }
 
-const string& Field::getName() const
-{
-  return _name;
+const string& Field::getName() const {
+  return *_name;
 }
 
-const char *Field::getCharName() const
-{
-  return _name.c_str();
+const char* Field::getCharName() const {
+  return _name->c_str();
 }
index ce8e24adeea7e7a57fe0ada51c064414d27be500..25427b3ebeb491f84289855ba80d7ad6d062518f 100644 (file)
 
 #ifndef _ICoCoField_included_
 #define _ICoCoField_included_
-
 #include <string>
 
-namespace ICoCo
-{
-  class Field
-  {
+
+namespace ICoCo {
+
+  class Field {
   public:
     Field();
     virtual ~Field();
     void setName(const std::string& name);
     const std::string& getName() const;
-    const char *getCharName() const;
+    const char* getCharName() const;
+    
   private:
-    std::string _name;
+    std::string* _name;
   };
 }
-
 #endif