Default mutable attributes implementation. More...
#include <easyxml.hxx>
 
  
 | Public Member Functions | |
| XMLAttributesDefault () | |
| Default constructor. | |
| XMLAttributesDefault (const XMLAttributes &atts) | |
| Copy constructor. | |
| virtual | ~XMLAttributesDefault () | 
| Destructor. | |
| virtual int | size () const | 
| Count the attributes in the list. | |
| virtual const char * | getName (int i) const | 
| Get the name of an attribute by index. | |
| virtual const char * | getValue (int i) const | 
| Get the value of an attribute by index. | |
| virtual void | addAttribute (const char *name, const char *value) | 
| Add an attribute to an attribute list. | |
| virtual void | setName (int i, const char *name) | 
| Set an attribute name by index. | |
| virtual void | setValue (int i, const char *value) | 
| Set an attribute value by index. | |
| virtual void | setValue (const char *name, const char *value) | 
| Set an attribute value by name. | |
Default mutable attributes implementation.
This class provides a default implementation of the XMLAttributes interface. The implementation is mutable, so that it is possible to modify the attribute list when necessary. This class is particularly useful for taking a snapshot of an attribute list during parsing.
Definition at line 130 of file easyxml.hxx.
| XMLAttributesDefault::XMLAttributesDefault | ( | const XMLAttributes & | atts | ) | 
Copy constructor.
This constructor is especially useful for taking a static snapshot of an attribute list for later use.
| atts | The attribute list to copy. | 
Definition at line 69 of file easyxml.cxx.
| void XMLAttributesDefault::addAttribute | ( | const char * | name, | |
| const char * | value | |||
| ) |  [virtual] | 
Add an attribute to an attribute list.
The name is required to be unique in the list; the value is not.
| name | The name of the attribute to add. | |
| value | The value of the attribute to add. | 
Definition at line 99 of file easyxml.cxx.
| void XMLAttributesDefault::setName | ( | int | i, | |
| const char * | name | |||
| ) |  [virtual] | 
Set an attribute name by index.
This method will not extend the list; the attribute must already exist.
| i | The index of the attribute (zero-based). | |
| name | The new name. | 
Definition at line 106 of file easyxml.cxx.
| void XMLAttributesDefault::setValue | ( | const char * | name, | |
| const char * | value | |||
| ) |  [virtual] | 
Set an attribute value by name.
This method will not extend the list; the attribute must already exist.
| name | The name of the attribute that will have the new value. | |
| value | The new value. | 
Definition at line 118 of file easyxml.cxx.
| void XMLAttributesDefault::setValue | ( | int | i, | |
| const char * | value | |||
| ) |  [virtual] | 
Set an attribute value by index.
This method will not extend the list; the attribute must already exist.
| i | The index of the attribute (zero-based). | |
| value | The new value. | 
Definition at line 112 of file easyxml.cxx.
 1.6.1
 1.6.1