Salome HOME
Copyrights update 2015.
[tools/medcoupling.git] / src / ParaMEDMEM / ICoCoField.cxx
index 3db974ef66d22323f0b002022e8b218b2ba5896f..3925945b7fe08e813b2bb6e40d1573474f7e06e0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 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();
 }