Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TreeNode Class Reference

#include <TreeNode.h>

List of all members.


Detailed Description

TreeNode, A node which consists of a name value and a list of child nodes.

TreeNode is used for XML Parsing output.

Definition at line 8 of file TreeNode.h.

Public Methods

 TreeNode (string name, string value, vector< TreeNode * > *childVec)
 TreeNode (string name, string value)
 TreeNode ()
vector< TreeNode * > * getChildren ()
 getChildren Returns a list of child nodes.

string getName ()
 Returns the name of the treeNode.

string getValue ()
 Returns the value of the treeNode.

TreeNode * getChild (const string &name)
 getChild gets the 1st Child with the node name name, throws an string * exception if the node is not found

bool existChild (const string &name)
 Does a child by name exist?

virtual ~TreeNode ()
 Destructor.

void clearChildren ()
 remove all children


Public Attributes

vector< TreeNode * > * children
 list of Child nodes

string name
 the name of the TreeNode

string value
 it's value


Private Methods

void init (string name, string value, vector< TreeNode * > *vecChild)


Constructor & Destructor Documentation

TreeNode::TreeNode string    name,
string    value,
vector< TreeNode * > *    childVec
 

Definition at line 3 of file TreeNode.C.

References init(), name, and value.

TreeNode::TreeNode string    name,
string    value
 

Definition at line 6 of file TreeNode.C.

References init(), name, and value.

TreeNode::TreeNode  
 

Definition at line 9 of file TreeNode.C.

References init().

TreeNode::~TreeNode   [virtual]
 

Destructor.

Definition at line 21 of file TreeNode.C.

References children, and clearChildren().


Member Function Documentation

void TreeNode::clearChildren  
 

remove all children

Definition at line 66 of file TreeNode.C.

References children.

Referenced by parseXML(), and ~TreeNode().

bool TreeNode::existChild const string &    name
 

Does a child by name exist?

Definition at line 51 of file TreeNode.C.

References children, and name.

Referenced by MessageExecutor::executeMessage().

TreeNode * TreeNode::getChild const string &    name
 

getChild gets the 1st Child with the node name name, throws an string * exception if the node is not found

Definition at line 38 of file TreeNode.C.

References children, and name.

Referenced by MessageExecutor::executeMessage(), and mainTest().

vector< TreeNode * > * TreeNode::getChildren  
 

getChildren Returns a list of child nodes.

Definition at line 63 of file TreeNode.C.

References children.

Referenced by traverseTree().

string TreeNode::getName  
 

Returns the name of the treeNode.

Definition at line 73 of file TreeNode.C.

References name.

string TreeNode::getValue  
 

Returns the value of the treeNode.

Definition at line 74 of file TreeNode.C.

References value.

Referenced by MessageExecutor::executeMessage(), mainTest(), and traverseTree().

void TreeNode::init string    name,
string    value,
vector< TreeNode * > *    vecChild
[private]
 

Definition at line 12 of file TreeNode.C.

References children, name, and value.

Referenced by TreeNode().


Member Data Documentation

vector<TreeNode*>* TreeNode::children
 

list of Child nodes

Definition at line 16 of file TreeNode.h.

Referenced by clearChildren(), existChild(), getChild(), getChildren(), init(), parseXML(), and ~TreeNode().

string TreeNode::name
 

the name of the TreeNode

Definition at line 20 of file TreeNode.h.

Referenced by existChild(), getChild(), getName(), init(), and TreeNode().

string TreeNode::value
 

it's value

Definition at line 24 of file TreeNode.h.

Referenced by getValue(), init(), parseXML(), and TreeNode().


The documentation for this class was generated from the following files:
Generated on Tue Dec 17 21:14:41 2002 for AUSS_Connector by doxygen1.2.18