From: abn Date: Thu, 20 Nov 2014 08:08:23 +0000 (+0100) Subject: Reverting to previous impl. of ICoCoField for compatibility with Cathare. X-Git-Tag: V7_5_0rc1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=029c366142416ed7fcd76d76a3f564261a0bc1dc;p=modules%2Fmed.git Reverting to previous impl. of ICoCoField for compatibility with Cathare. --- diff --git a/src/ParaMEDMEM/ICoCoField.cxx b/src/ParaMEDMEM/ICoCoField.cxx index 3db974ef6..38d58e7f6 100644 --- a/src/ParaMEDMEM/ICoCoField.cxx +++ b/src/ParaMEDMEM/ICoCoField.cxx @@ -27,25 +27,22 @@ 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(); } diff --git a/src/ParaMEDMEM/ICoCoField.hxx b/src/ParaMEDMEM/ICoCoField.hxx index ce8e24ade..25427b3eb 100644 --- a/src/ParaMEDMEM/ICoCoField.hxx +++ b/src/ParaMEDMEM/ICoCoField.hxx @@ -23,22 +23,21 @@ #ifndef _ICoCoField_included_ #define _ICoCoField_included_ - #include -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