Last change
on this file since 467 was
369,
checked in by ymipsl, 12 years ago
|
Major Update
- redesign Type and attribute manipulation
- add enumerate type and attribute
- use blitz class array instead of boost class array
YM
|
File size:
1.3 KB
|
Rev | Line | |
---|
[219] | 1 | #include "object.hpp" |
---|
| 2 | |
---|
[335] | 3 | namespace xios |
---|
[219] | 4 | { |
---|
| 5 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 6 | |
---|
| 7 | CObject::CObject(void) |
---|
| 8 | : id(), IdDefined(false) |
---|
| 9 | { /* Ne rien faire de plus */ } |
---|
| 10 | |
---|
| 11 | CObject::CObject(const StdString & id) |
---|
| 12 | : id(id), IdDefined(true) |
---|
| 13 | { /* Ne rien faire de plus */ } |
---|
| 14 | |
---|
| 15 | CObject::CObject(const CObject & object) |
---|
| 16 | : id(object.id), IdDefined(object.IdDefined) |
---|
| 17 | { /* Ne rien faire de plus */ } |
---|
| 18 | |
---|
| 19 | CObject::~CObject(void) |
---|
| 20 | { /* Ne rien faire de plus */ } |
---|
| 21 | |
---|
| 22 | const StdString & CObject::getId(void) const |
---|
| 23 | { |
---|
| 24 | return (this->id); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | bool CObject::hasId(void) const |
---|
| 28 | { |
---|
| 29 | return (this->IdDefined); |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | void CObject::resetId(void) |
---|
| 33 | { |
---|
| 34 | this->IdDefined = false ; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | void CObject::setId(const StdString & id) |
---|
| 38 | { |
---|
| 39 | this->id = id ; |
---|
| 40 | this->IdDefined = true ; |
---|
| 41 | } |
---|
[369] | 42 | /* |
---|
[219] | 43 | bool CObject::operator==(const CObject & other) const |
---|
| 44 | { |
---|
| 45 | if(!this->hasId() || !other.hasId()) |
---|
| 46 | return (false); |
---|
| 47 | return (this->id.compare(other.id) == 0); |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | bool CObject::operator!=(const CObject & other) const |
---|
| 51 | { |
---|
| 52 | return (!(*this == other)); |
---|
| 53 | } |
---|
[369] | 54 | */ |
---|
[219] | 55 | StdOStream & operator << (StdOStream & os, const CObject & object) |
---|
| 56 | { |
---|
| 57 | os << object.toString(); |
---|
| 58 | return (os); |
---|
| 59 | } |
---|
| 60 | |
---|
[335] | 61 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.