XML Library
|
The collection of attributes for a node. More...
#include <Attributes.hpp>
Public Types | |
typedef Container::const_iterator | const_iterator |
The iterator type. | |
typedef Container::iterator | iterator |
The const iterator type. | |
Public Member Functions | |
Attributes () | |
Default constructor. | |
~Attributes () | |
Destructor. | |
bool | isEmpty () const |
Query if the collection is empty. | |
size_t | count () const |
Query how many attributes there are. | |
const_iterator | begin () const |
Get the start iterator for the collection. | |
const_iterator | end () const |
Get the end iterator for the collection. | |
iterator | begin () |
Get the start iterator for the collection. | |
iterator | end () |
Get the end iterator for the collection. | |
void | clear () |
Clear the set of attributes. | |
void | setAttribute (const AttributePtr &pAttribute) |
Set an attribute. | |
AttributePtr | find (const tstring &strName) const |
Find an attribute by its name. | |
AttributePtr | get (const tstring &strName) const |
Get an attribute by its name or throw if not found. | |
Private Types | |
typedef std::vector< AttributePtr > | Container |
The underlying container type. | |
Private Attributes | |
Container | m_vAttribs |
The underlying container. |
The collection of attributes for a node.
typedef std::vector<AttributePtr> XML::Attributes::Container [private] |
The underlying container type.
typedef Container::const_iterator XML::Attributes::const_iterator |
The iterator type.
typedef Container::iterator XML::Attributes::iterator |
The const iterator type.
Default constructor.
Destructor.
bool XML::Attributes::isEmpty | ( | ) | const [inline] |
Query if the collection is empty.
size_t XML::Attributes::count | ( | ) | const [inline] |
Query how many attributes there are.
Attributes::const_iterator XML::Attributes::begin | ( | ) | const [inline] |
Get the start iterator for the collection.
Attributes::const_iterator XML::Attributes::end | ( | ) | const [inline] |
Get the end iterator for the collection.
Attributes::iterator XML::Attributes::begin | ( | ) | [inline] |
Get the start iterator for the collection.
Attributes::iterator XML::Attributes::end | ( | ) | [inline] |
Get the end iterator for the collection.
void XML::Attributes::clear | ( | ) |
Clear the set of attributes.
void XML::Attributes::setAttribute | ( | const AttributePtr & | pAttribute | ) |
Set an attribute.
If the attribute name already exists in the collection it replaces it, otherwise it is appeneded.
AttributePtr XML::Attributes::find | ( | const tstring & | strName | ) | const |
Find an attribute by its name.
AttributePtr XML::Attributes::get | ( | const tstring & | strName | ) | const |
Get an attribute by its name or throw if not found.
Container XML::Attributes::m_vAttribs [private] |
The underlying container.