Last change
on this file since 141 was
141,
checked in by hozdoba, 13 years ago
|
Mise à jour depuis un autre dépôt
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "object.hpp" |
---|
2 | |
---|
3 | namespace xmlioserver |
---|
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 { return (this->id); } |
---|
23 | |
---|
24 | bool CObject::hasId(void) const { return (this->IdDefined); } |
---|
25 | |
---|
26 | void CObject::resetId(void) { this->IdDefined = false ;} |
---|
27 | |
---|
28 | void CObject::setId(const StdString & id) |
---|
29 | { this->id = id ; this->IdDefined = true ; } |
---|
30 | |
---|
31 | bool CObject::operator==(const CObject & other) const |
---|
32 | { |
---|
33 | if(!this->hasId() || !other.hasId()) |
---|
34 | return (false); |
---|
35 | return (this->id.compare(other.id) == 0); |
---|
36 | } |
---|
37 | |
---|
38 | bool CObject::operator!=(const CObject & other) const |
---|
39 | { return (!(*this == other)); } |
---|
40 | |
---|
41 | StdOStream & operator << (StdOStream & os, const CObject & object) |
---|
42 | { os << object.toString(); return (os); } |
---|
43 | |
---|
44 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.