-// 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();
}