...
 
Commits (1)
...@@ -311,9 +311,9 @@ namespace TRC ...@@ -311,9 +311,9 @@ namespace TRC
public: public:
Connection(const char *name) Connection(const char *s)
{ {
n = new std::string(name); n = new std::string(s);
c[0] = c[1] = c[2] = NC; c[0] = c[1] = c[2] = NC;
} }
...@@ -356,10 +356,9 @@ namespace TRC ...@@ -356,10 +356,9 @@ namespace TRC
int apply(char a); int apply(char a);
char operator<<(char a) int operator<<(char a)
{ {
apply(a); return apply(a);
return a;
} }
}; };
...@@ -410,13 +409,28 @@ namespace TRC ...@@ -410,13 +409,28 @@ namespace TRC
public: public:
std::string *n;
Entity() Entity()
{ {
sys = System::getInstance(); sys = System::getInstance();
n = nullptr;
} }
virtual ~Entity() virtual ~Entity()
{ {
if(n!=nullptr) delete n;
}
const std::string & name()
{
return *n;
}
void name(const char* s)
{
if(n!=nullptr) delete n;
n = new std::string(s);
} }
int at(const char* n, unsigned short k = 1, char c = NC) int at(const char* n, unsigned short k = 1, char c = NC)
......