Rev | Line | |
---|
[152] | 1 | #include "attribute.hpp" |
---|
| 2 | |
---|
| 3 | namespace xmlioserver |
---|
| 4 | { |
---|
| 5 | namespace tree |
---|
| 6 | { |
---|
| 7 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 8 | CAttribute::CAttribute(const StdString & id) |
---|
| 9 | : CObject(id) |
---|
| 10 | , value() |
---|
| 11 | { /* Ne rien faire de plus */ } |
---|
| 12 | |
---|
| 13 | CAttribute::CAttribute(const CAttribute & attribut) |
---|
| 14 | : CObject(attribut.getId()) |
---|
[172] | 15 | { |
---|
| 16 | this->value = attribut.getAnyValue(); |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | CAttribute::~CAttribute(void) |
---|
| 20 | { /* Ne rien faire de plus */ } |
---|
| 21 | |
---|
| 22 | ///-------------------------------------------------------------- |
---|
[152] | 23 | |
---|
| 24 | const boost::any & CAttribute::getAnyValue(void) const |
---|
[172] | 25 | { |
---|
| 26 | return (this->value); |
---|
| 27 | } |
---|
[152] | 28 | |
---|
| 29 | |
---|
| 30 | void CAttribute::setAnyValue(const boost::any & value) |
---|
[172] | 31 | { |
---|
| 32 | this->value = value; |
---|
| 33 | } |
---|
[180] | 34 | |
---|
| 35 | void CAttribute::clear(void) |
---|
| 36 | { |
---|
| 37 | this->value = boost::any(); |
---|
| 38 | } |
---|
[152] | 39 | |
---|
[172] | 40 | //--------------------------------------------------------------- |
---|
[152] | 41 | |
---|
| 42 | bool CAttribute::isEmpty(void) const |
---|
[172] | 43 | { |
---|
| 44 | return (this->value.empty()); |
---|
| 45 | } |
---|
[152] | 46 | |
---|
| 47 | const StdString & CAttribute::getName(void) const |
---|
[172] | 48 | { |
---|
| 49 | return (this->getId()); |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | ///-------------------------------------------------------------- |
---|
[152] | 53 | |
---|
| 54 | } // namespace tree |
---|
| 55 | } // namespace xmlioserver |
---|
Note: See
TracBrowser
for help on using the repository browser.