Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

XMLNode Class Reference

#include <XMLNode.hpp>

List of all members.

Public Types

typedef std::map< std::string,
std::string > 
MAttributes

Public Methods

 XMLNode (const std::string &name)
 XMLNode (const std::string &name, const std::string &value)
 XMLNode (const std::string &name, const MAttributes &attributes)
 XMLNode (const std::string &name, const MAttributes &attributes, const std::string &value)
 ~XMLNode ()
 clean up

void addChild (XMLNode *child)
void addAttribute (const std::string &key, const std::string &value)
void setValue (const std::string &value)
const std::string & getName () const
 
Returns:
the name of this node


const std::string & getValue () const
 
Returns:
the value of this node


const MAttributesgetAttributes () const
 
Returns:
the attributes of this node


std::string getAttribute (const std::string &name) const
const std::vector< XMLNode * > & getChildren () const
const XMLNode * getChild (const std::string &name) const
std::string getChildValue (const std::string &name) const


Detailed Description

Internal Representation of an XML node hierarchy.


Member Typedef Documentation

typedef std::map<std::string,std::string> XMLNode::MAttributes
 


Constructor & Destructor Documentation

XMLNode::XMLNode const std::string &    name
 

Create a node with the given name

Parameters:
name  the name for the node.

XMLNode::XMLNode const std::string &    name,
const std::string &    value
 

Create a node with the given name and value

Parameters:
name  the name for the node.
value  the value for the node

XMLNode::XMLNode const std::string &    name,
const MAttributes   attributes
 

Create a node with the given name and value

Parameters:
name  the name for the node.
attributes  the map constituting the value for the node

XMLNode::XMLNode const std::string &    name,
const MAttributes   attributes,
const std::string &    value
 

Create a node with the given name and value

Parameters:
name  the name for the node.
attributes  the map constituting the value for the node
value  the string value for the node.

XMLNode::~XMLNode  
 

clean up


Member Function Documentation

void XMLNode::addAttribute const std::string &    key,
const std::string &    value
 

Add an attribute to this node.

Parameters:
key  the key for the parameter
value  the value for the parameter

void XMLNode::addChild XMLNode *    child
 

Add a child to this node.

Parameters:
child  the child to add

std::string XMLNode::getAttribute const std::string &    name const
 

Get the named attribute value

Parameters:
name  the key
Returns:
the value

const XMLNode::MAttributes & XMLNode::getAttributes  
 

Returns:
the attributes of this node

const XMLNode * XMLNode::getChild const std::string &    name const
 

Get the named child of this node.

Parameters:
name  the key
Returns:
the named child node

const std::vector< XMLNode * > & XMLNode::getChildren  
 

Get the children of this node

Returns:
the vector of child node pointers.

std::string XMLNode::getChildValue const std::string &    name const
 

Get the value of the named child of this node.

Parameters:
name  the key
Returns:
the value of the named child node

const std::string & XMLNode::getName  
 

Returns:
the name of this node

const std::string & XMLNode::getValue  
 

Returns:
the value of this node

void XMLNode::setValue const std::string &    value
 

Set the value of this node

Parameters:
value  the new value


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 13:00:02 2004 for Lemur Toolkit by doxygen1.2.18