Last change
on this file since 1265 was
219,
checked in by hozdoba, 13 years ago
|
Préparation nouvelle arborescence
|
File size:
1.3 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 |
---|
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 | } |
---|
42 | |
---|
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 | } |
---|
54 | |
---|
55 | StdOStream & operator << (StdOStream & os, const CObject & object) |
---|
56 | { |
---|
57 | os << object.toString(); |
---|
58 | return (os); |
---|
59 | } |
---|
60 | |
---|
61 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.