Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
XMLAttributesDefault Class Reference

#include <easyxml.hpp>

Inheritance diagram for XMLAttributesDefault:
XMLAttributes

Public Member Functions

 XMLAttributesDefault ()
 Default constructor.
 
 XMLAttributesDefault (const XMLAttributes &atts)
 
virtual ~XMLAttributesDefault ()
 
virtual int size () const
 
virtual const char * getName (int i) const
 
virtual const char * getValue (int i) const
 
virtual void addAttribute (const char *name, const char *value)
 
virtual void setName (int i, const char *name)
 
virtual void setValue (int i, const char *value)
 
virtual void setValue (const char *name, const char *value)
 
- Public Member Functions inherited from XMLAttributes
 XMLAttributes ()
 Constructor.
 
virtual ~XMLAttributes ()
 Destructor.
 
virtual int findAttribute (const char *name) const
 
virtual bool hasAttribute (const char *name) const
 
virtual const char * getValue (const char *name) const
 

Detailed Description

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.

See Also
XMLAttributes

Constructor & Destructor Documentation

XMLAttributesDefault::XMLAttributesDefault ( const XMLAttributes atts)

Copy constructor.

This constructor is especially useful for taking a static snapshot of an attribute list for later use.

Parameters
attsThe attribute list to copy.
XMLAttributesDefault::~XMLAttributesDefault ( )
virtual

Destructor.

Member Function Documentation

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.

Parameters
nameThe name of the attribute to add.
valueThe value of the attribute to add.
const char * XMLAttributesDefault::getName ( int  i) const
virtual

Get the name of an attribute by index.

Implements XMLAttributes.

const char * XMLAttributesDefault::getValue ( int  i) const
virtual

Get the value of an attribute by index.

Implements XMLAttributes.

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.

Parameters
iThe index of the attribute (zero-based).
nameThe new name.
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.

Parameters
iThe index of the attribute (zero-based).
valueThe new value.
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.

Parameters
nameThe name of the attribute that will have the new value.
valueThe new value.
int XMLAttributesDefault::size ( ) const
virtual

Count the attributes in the list.

Implements XMLAttributes.


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