Rev | Line | |
---|
[79] | 1 | #ifndef BASE_OBJECT_HPP |
---|
| 2 | #define BASE_OBJECT_HPP |
---|
| 3 | |
---|
| 4 | #include "xmlio_std.hpp" |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | class CBase_object : public virtual CAttributRegistrar |
---|
| 8 | { |
---|
| 9 | public : |
---|
| 10 | string id ; |
---|
| 11 | bool hasId ; |
---|
| 12 | |
---|
| 13 | CBase_object(void) : hasId(false) {} |
---|
| 14 | CBase_object(const string& Id) : id(Id), hasId(true) {} |
---|
| 15 | |
---|
| 16 | void setId(const string& Id) |
---|
| 17 | { |
---|
| 18 | id=Id ; |
---|
| 19 | hasId=true ; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | ostream & PrintId(ostream& o) |
---|
| 23 | { |
---|
| 24 | if (hasId) o<<" ---> Id = "<<id ; |
---|
| 25 | else o<<" ---> No Id " ; |
---|
| 26 | return o ; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | } ; |
---|
| 30 | |
---|
| 31 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.