XMLNode Class Reference

#include <XMLNode.h>

List of all members.

Public Member Functions

 XMLNode ()
 XMLNode (string _name)
 XMLNode (string _name, string _value)
virtual ~XMLNode ()
void load (string filename)
void save (string filename)
XMLNodeaddChild (string name)
XMLNodeaddChild (string name, string value)
void delChild (string name)
XMLNodefindChild (string name)
list< XMLNode * > findAllChildren (string name)
string getName (void)
void setName (string name)
string getValue (void)
void setValue (string value)
unsigned int getSize ()
 XMLNode ()
 XMLNode (string _name)
 XMLNode (string _name, string _value)
virtual ~XMLNode ()
void load (string filename)
void save (string filename)
XMLNodeaddChild (string name)
XMLNodeaddChild (string name, string value)
void delChild (string name)
XMLNodefindChild (string name)
list< XMLNode * > findAllChildren (string name)
string getName (void)
void setName (string name)
string getValue (void)
void setValue (string value)
unsigned int getSize ()

Public Attributes

list< XMLNode * > children

Private Member Functions

 XMLNode (const char *file)
 XMLNode (ifstream *fp)
void load (const char *file)
void save (const char *file)
void load (ifstream *fp)
void save (ofstream *fp, unsigned int rekursionstiefe)
 XMLNode (const char *file)
 XMLNode (ifstream *fp)
void load (const char *file)
void save (const char *file)
void load (ifstream *fp)
void save (ofstream *fp, unsigned int rekursionstiefe)

Private Attributes

unsigned int size
string name
string value


Detailed Description

XML Parser

Constructor & Destructor Documentation

XMLNode::XMLNode (  ) 

Constructs a new empty XML node

XMLNode::XMLNode ( string  _name  ) 

Constructs a new XML node with the given name

Parameters:
_name Name of the new XML node

XMLNode::XMLNode ( string  _name,
string  _value 
)

Constructs a new XML node with the given name and value

Parameters:
_name Name of the new XML node
_value Value of the new XML node

XMLNode::~XMLNode (  )  [virtual]

destroys the XML node

XMLNode::XMLNode ( const char *  file  )  [private]

Constructs a new xml node (tree) from a file

Parameters:
file Filename

XMLNode::XMLNode ( ifstream *  fp  )  [private]

Constructs a new xml node (tree) from a stream

Parameters:
fp Pointer to a stream

XMLNode::XMLNode (  ) 

XMLNode::XMLNode ( string  _name  ) 

XMLNode::XMLNode ( string  _name,
string  _value 
)

virtual XMLNode::~XMLNode (  )  [virtual]

XMLNode::XMLNode ( const char *  file  )  [private]

XMLNode::XMLNode ( ifstream *  fp  )  [private]


Member Function Documentation

XMLNode* XMLNode::addChild ( string  name,
string  value 
)

XMLNode* XMLNode::addChild ( string  name  ) 

XMLNode * XMLNode::addChild ( string  name,
string  value 
)

Adds a new child to a xml node

Parameters:
name Name of the new child
value Value of the new child
Returns:
The new child node

XMLNode * XMLNode::addChild ( string  name  ) 

Adds a new child to a xml node

Parameters:
name Name of the new child
Returns:
The new child node

void XMLNode::delChild ( string  name  ) 

void XMLNode::delChild ( string  name  ) 

Deletes a child node

Parameters:
name Name of the child node which should be deleted

list<XMLNode *> XMLNode::findAllChildren ( string  name  ) 

list< XMLNode * > XMLNode::findAllChildren ( string  name  ) 

Finds all xml nodes of the given name

Parameters:
name Name of the xml nodes which should be found
Returns:
Founded xml nodes

XMLNode* XMLNode::findChild ( string  name  ) 

XMLNode * XMLNode::findChild ( string  name  ) 

Finds a xml node of the given name name Name of the xml node which should be found

Returns:
Founded xml node

string XMLNode::getName ( void   ) 

string XMLNode::getName ( void   ) 

Returns the name of the xml node hint: always convert the name to upper - it should already be

Returns:
Name of the xml node

unsigned int XMLNode::getSize (  ) 

unsigned int XMLNode::getSize (  ) 

Returns the size of the xml node

Returns:
size of the xml node

string XMLNode::getValue ( void   ) 

string XMLNode::getValue ( void   ) 

Returns the value of the xml node

Returns:
Value of the xml node

void XMLNode::load ( ifstream *  fp  )  [private]

void XMLNode::load ( const char *  file  )  [private]

void XMLNode::load ( string  filename  ) 

void XMLNode::load ( ifstream *  fp  )  [private]

Loads a new xml node (tree) from a stream

Parameters:
fp Pointer to a stream

void XMLNode::load ( const char *  file  )  [private]

Loads a new xml node (tree) from a stream

Parameters:
file Filename

void XMLNode::load ( string  filename  ) 

Loads a new xml node (tree) from a stream

Parameters:
filename Filename

void XMLNode::save ( ofstream *  fp,
unsigned int  rekursionstiefe 
) [private]

void XMLNode::save ( const char *  file  )  [private]

void XMLNode::save ( string  filename  ) 

void XMLNode::save ( ofstream *  fp,
unsigned int  rekursionstiefe 
) [private]

Saves a xml node (tree) to a stream

Parameters:
fp Pointer to a stream
rekursionstiefe Depth of the tree which should be saved

void XMLNode::save ( const char *  file  )  [private]

Saves a xml node (tree) to a file

Parameters:
file Filename

void XMLNode::save ( string  filename  ) 

Saves a xml node (tree) to a file

Parameters:
filename Filename

void XMLNode::setName ( string  name  ) 

void XMLNode::setName ( string  _name  ) 

Sets the name of the xml node hint: always convert the name to upper

Parameters:
_name New name of the xml node

void XMLNode::setValue ( string  value  ) 

void XMLNode::setValue ( string  value  ) 

Sets the value of a xml node

Parameters:
value Value to set


Member Data Documentation

children list

string XMLNode::name [private]

name of the xml node

unsigned int XMLNode::size [private]

size of the xml tree

value of the xml node


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

Generated on Tue Jan 20 23:44:15 2009 for FlowVis by  doxygen 1.5.7.1