XML Library
Public Types | Public Member Functions | Private Types | Private Attributes
XML::Attributes Class Reference

The collection of attributes for a node. More...

#include <Attributes.hpp>

List of all members.

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< AttributePtrContainer
 The underlying container type.

Private Attributes

Container m_vAttribs
 The underlying container.

Detailed Description

The collection of attributes for a node.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

Default constructor.

Destructor.


Member Function Documentation

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.

Get the start iterator for the collection.

Get the end iterator for the collection.

Get the start iterator for the collection.

Get the end iterator for the collection.

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.


Member Data Documentation

The underlying container.


The documentation for this class was generated from the following files: