MultiAgentDecisionProcess  Release 0.2.1
NamedDescribedEntity.cpp
Go to the documentation of this file.
1 
28 #include "NamedDescribedEntity.h"
29 #include <sstream>
30 
31 using namespace std;
32 
33 #define DEBUG_NDE 0
34 
35 NamedDescribedEntity::NamedDescribedEntity(string name, string description)
36 {
37  _m_name = new string(name);
38  _m_description = new string(description);
39 }
42 {
43 if(DEBUG_NDE) cout << " |cloning NamedDescribedEntity "<<a.GetName()<<"|"<<endl;
44  _m_name = new string(a.GetName());
45  _m_description = new string(a.GetDescription());
46 }
48 {
49 if(DEBUG_NDE) cout << " |deleting NamedDescribedEntity "<<GetName()<<"|"<<endl;
50  delete(_m_name);
51  delete(_m_description);
52 }
53 
55 {
56  stringstream ss;
57  ss << "name:" << this->GetName()
58  << " - descr." << this->GetDescription();
59  return(ss.str());
60 }
61 
63 {
64  return(GetName());
65 }