XMLAttributesDefault Class Reference

#include <easyxml.hxx>

Inherits XMLAttributes.

List of all members.


Detailed Description

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

Definition at line 116 of file easyxml.hxx.


Public Member Functions

virtual void addAttribute (const char *name, const char *value)
 Add an attribute to an attribute 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 setName (int i, const char *name)
 Set an attribute name by index.
virtual void setValue (const char *name, const char *value)
 Set an attribute value by name.
virtual void setValue (int i, const char *value)
 Set an attribute value by index.
virtual int size () const
 Count the attributes in the list.
 XMLAttributesDefault (const XMLAttributes &atts)
 Copy constructor.
 XMLAttributesDefault ()
 Default constructor.
virtual ~XMLAttributesDefault ()
 Destructor.

Constructor & Destructor Documentation

XMLAttributesDefault ( const XMLAttributes atts  ) 

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

Parameters:
atts The attribute list to copy.

Definition at line 85 of file easyxml.cpp.


Member Function Documentation

void addAttribute ( const char *  name,
const char *  value 
) [virtual]

The name is required to be unique in the list; the value is not.

Parameters:
name The name of the attribute to add.
value The value of the attribute to add.

Definition at line 121 of file easyxml.cpp.

void setName ( int  i,
const char *  name 
) [virtual]

This method will not extend the list; the attribute must already exist.

Parameters:
i The index of the attribute (zero-based).
name The new name.

Definition at line 129 of file easyxml.cpp.

void setValue ( const char *  name,
const char *  value 
) [virtual]

This method will not extend the list; the attribute must already exist.

Parameters:
name The name of the attribute that will have the new value.
value The new value.

Definition at line 143 of file easyxml.cpp.

void setValue ( int  i,
const char *  value 
) [virtual]

This method will not extend the list; the attribute must already exist.

Parameters:
i The index of the attribute (zero-based).
value The new value.

Definition at line 136 of file easyxml.cpp.


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

Generated on Tue May 26 00:55:08 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5