VVSDK  1.0
The VVAmbisonic Library
Public Member Functions | Public Attributes | List of all members
CXMLElement Class Reference

#include <XMLParser.h>

Public Member Functions

 CXMLElement ()
 
 CXMLElement (string strTagName)
 
 ~CXMLElement ()
 
string GetTagName ()
 
CXMLElementAddChild (CXMLElement *pNewElement)
 
CXMLElementAddChild (string strTagName)
 
CXMLElementAddChild (string strTagName, string strText)
 
CXMLElementAddChild (string strTagName, int n)
 
CXMLElementAddChild (string strTagName, long n)
 
CXMLElementAddChild (string strTagName, float x)
 
CXMLElementAddChild (string strTagName, float x, string fmt)
 
CXMLElementAddChild (string strTagName, double x)
 
CXMLElementAddChild (string strTagName, bool b)
 
void RemoveChild (long ndx)
 
CXMLElementGetChild (string strKey, long ndx=0)
 
CXMLElementGetChild (long ndx)
 
long GetChildCount ()
 
long GetChildCount (string str)
 
string GetValue ()
 
int GetIntValue ()
 
long GetLongValue ()
 
float GetFloatValue ()
 
double GetDblValue ()
 
bool GetBoolValue ()
 
string GetChildValue (string childName, string defaultValue)
 
int GetChildIntValue (string childName, int defaultValue)
 
long GetChildLongValue (string childName, long defaultValue)
 
float GetChildFloatValue (string childName, float defaultValue)
 
double GetChildDblValue (string childName, double defaultValue)
 
bool GetChildBoolValue (string childName, bool defaultValue)
 
string GetXML ()
 
string GetStrValue ()
 

Public Attributes

CXMLElementList m_vChildren
 
CXMLElementm_pParentElement
 
CXAttributeListm_pattList
 
string m_strTagName
 
string m_strText
 

Detailed Description

XML Element With quick methods for adding child values

Constructor & Destructor Documentation

CXMLElement::CXMLElement ( )
CXMLElement::CXMLElement ( string  strTagName)
CXMLElement::~CXMLElement ( )

Member Function Documentation

CXMLElement * CXMLElement::AddChild ( CXMLElement pNewElement)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
string  strText 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
int  n 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
long  n 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
float  x 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
float  x,
string  fmt 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
double  x 
)

insert at end of list, return ndx

CXMLElement * CXMLElement::AddChild ( string  strTagName,
bool  b 
)

insert "True" or "False" at end of list, return ndx

bool CXMLElement::GetBoolValue ( )

return element's text converted to a boolean

CXMLElement * CXMLElement::GetChild ( string  strKey,
long  ndx = 0 
)

get child element by name

CXMLElement * CXMLElement::GetChild ( long  ndx)

get child element by index

bool CXMLElement::GetChildBoolValue ( string  childName,
bool  defaultValue 
)

return element's text converted to a boolean

long CXMLElement::GetChildCount ( )

get number of children

long CXMLElement::GetChildCount ( string  str)

get number of children with the given name

double CXMLElement::GetChildDblValue ( string  childName,
double  defaultValue 
)

return element's text converted to an double

float CXMLElement::GetChildFloatValue ( string  childName,
float  defaultValue 
)

return element's text converted to a float

int CXMLElement::GetChildIntValue ( string  childName,
int  defaultValue 
)

return element's text converted to an int

long CXMLElement::GetChildLongValue ( string  childName,
long  defaultValue 
)

return element's text converted to an long

string CXMLElement::GetChildValue ( string  childName,
string  defaultValue 
)

return child element's text or default if not found

double CXMLElement::GetDblValue ( )

return element's text converted to an double

float CXMLElement::GetFloatValue ( )

return element's text converted to a float

int CXMLElement::GetIntValue ( )

return element's text converted to an int

long CXMLElement::GetLongValue ( )

return element's text converted to an long

string CXMLElement::GetStrValue ( )
string CXMLElement::GetTagName ( )
string CXMLElement::GetValue ( )

return element's text

string CXMLElement::GetXML ( )

return the complete XML as a string starting with this element

void CXMLElement::RemoveChild ( long  ndx)

delete element at location ndx

Member Data Documentation

CXAttributeList* CXMLElement::m_pattList
CXMLElement* CXMLElement::m_pParentElement
string CXMLElement::m_strTagName
string CXMLElement::m_strText
CXMLElementList CXMLElement::m_vChildren

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