Ravelin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Ravelin::XMLTree Class Reference

An XML tree used for serialization. More...

#include <XMLTree.h>

Inheritance diagram for Ravelin::XMLTree:

Public Member Functions

 XMLTree (const std::string &name)
 Constructs a XMLTree with no attributes.
 
 XMLTree (const std::string &name, const std::list< XMLAttrib > &attributes)
 Constructs a XMLTree with the specified list of attributes.
 
XMLAttribget_attrib (const std::string &attrib_name) const
 Gets the specified attribute. More...
 
std::list< boost::shared_ptr
< const XMLTree > > 
find_child_nodes (const std::string &name) const
 Returns a list of all child nodes (not including further descendants) matching the given name (case insensitive)
 
std::list< boost::shared_ptr
< const XMLTree > > 
find_child_nodes (const std::list< std::string > &name) const
 Returns a list of all child nodes (not including further descendants) matching any of the names in the given list (case insensitive)
 
std::list< boost::shared_ptr
< const XMLTree > > 
find_descendant_nodes (const std::string &name) const
 
void add_child (boost::shared_ptr< XMLTree > child)
 Adds a child tree to this tree; also sets the parent node.
 
void set_parent (boost::shared_ptr< XMLTree > parent)
 Sets the parent of this tree (if any)
 
boost::weak_ptr< XMLTreeget_parent () const
 Gets the parent of this tree (if any)
 

Static Public Member Functions

static boost::shared_ptr
< const XMLTree
read_from_xml (const std::string &name)
 

Public Attributes

std::set< XMLAttribattribs
 The set of attributes of this node.
 
std::list< boost::shared_ptr
< XMLTree > > 
children
 The list of children of this node.
 
std::string name
 The name of this node.
 
std::string id
 The ID of this node.
 
std::string content
 Any 'content' of this node.
 
boost::shared_ptr< void > object
 The object (if any) represented by this node.
 
bool processed
 Indicates whether this tag has been processed.
 

Detailed Description

An XML tree used for serialization.

Member Function Documentation

XMLAttrib * XMLTree::get_attrib ( const std::string &  attrib_name) const

Gets the specified attribute.

Returns
a pointer to the attribute with the specified name, or NULL if the requested attribute does not exist

References attribs.


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