Public Member Functions

Tiny2D::XMLNode Class Reference

XML node. More...

#include <Tiny2D.h>

List of all members.

Public Member Functions

XMLNodeGetNext (const char *name=NULL)
 Gets next node of given name (or just next node if name is NULL)
const char * GetName () const
 Gets node name.
const char * GetValue () const
 Gets node value.
XMLNodeGetFirstNode (const char *name=NULL)
 Gets first node of given name (or just first node if name is NULL) in a given parent node.
int CalcNumNodes (const char *name=NULL)
 Gets number of nodes with given name (or just all nodes if name is NULL) in a given parent node.
XMLAttributeGetFirstAttribute (const char *name=NULL)
 Gets first attribute of given name (or just first attribute if name is NULL) in a given parent node.
const char * GetAttributeValue (const char *name)
 Gets string value of the first attribute of given name in a given parent node; returns NULL if not found.
bool GetAttributeValueBool (const char *name, bool &result)
 Gets bool value of the first attribute of given name in a given parent node; returns true on success.
bool GetAttributeValueFloat (const char *name, float &result)
 Gets float value of the first attribute of given name in a given parent node; returns true on success.
bool GetAttributeValueFloatArray (const char *name, float *result, int count)
 Gets an array of floats (space separates) attribute value of the first attribute of given name in a given parent node; returns true on success.
bool GetAttributeValueInt (const char *name, int &result)
 Gets int value of the first attribute of given name in a given parent node; returns true on success.
const char * GetAttributeValue (const char *name, const char *defaultValue)
 Gets string value of the first attribute of given name in a given parent node; returns given default value if not found.
void GetAttributeValueBool (const char *name, bool &result, const bool defaultValue)
 Gets bool value of the first attribute of given name in a given parent node; returns given default value if not found.
void GetAttributeValueFloat (const char *name, float &result, const float defaultValue)
 Gets float value of the first attribute of given name in a given parent node; returns given default value if not found.
void GetAttributeValueInt (const char *name, int &result, const int defaultValue)
 Gets int value of the first attribute of given name in a given parent node; returns given default value if not found.
XMLNodeAddNode (const char *name)
 Adds child node to a given node.
XMLAttributeAddAttribute (const char *name, const char *value)
 Adds attribute to given node.
XMLAttributeAddAttributeBool (const char *name, bool value)
 Adds bool attribute to given node.
XMLAttributeAddAttributeInt (const char *name, int value)
 Adds int attribute to given node.
XMLAttributeAddAttributeFloat (const char *name, float value)
 Adds float attribute to given node.

Detailed Description

XML node.


Member Function Documentation

XMLAttribute* Tiny2D::XMLNode::AddAttribute ( const char *  name,
const char *  value 
)

Adds attribute to given node.

XMLAttribute* Tiny2D::XMLNode::AddAttributeBool ( const char *  name,
bool  value 
)

Adds bool attribute to given node.

XMLAttribute* Tiny2D::XMLNode::AddAttributeFloat ( const char *  name,
float  value 
)

Adds float attribute to given node.

XMLAttribute* Tiny2D::XMLNode::AddAttributeInt ( const char *  name,
int  value 
)

Adds int attribute to given node.

XMLNode* Tiny2D::XMLNode::AddNode ( const char *  name )

Adds child node to a given node.

int Tiny2D::XMLNode::CalcNumNodes ( const char *  name = NULL )

Gets number of nodes with given name (or just all nodes if name is NULL) in a given parent node.

const char* Tiny2D::XMLNode::GetAttributeValue ( const char *  name )

Gets string value of the first attribute of given name in a given parent node; returns NULL if not found.

const char* Tiny2D::XMLNode::GetAttributeValue ( const char *  name,
const char *  defaultValue 
)

Gets string value of the first attribute of given name in a given parent node; returns given default value if not found.

bool Tiny2D::XMLNode::GetAttributeValueBool ( const char *  name,
bool &  result 
)

Gets bool value of the first attribute of given name in a given parent node; returns true on success.

void Tiny2D::XMLNode::GetAttributeValueBool ( const char *  name,
bool &  result,
const bool  defaultValue 
)

Gets bool value of the first attribute of given name in a given parent node; returns given default value if not found.

bool Tiny2D::XMLNode::GetAttributeValueFloat ( const char *  name,
float &  result 
)

Gets float value of the first attribute of given name in a given parent node; returns true on success.

void Tiny2D::XMLNode::GetAttributeValueFloat ( const char *  name,
float &  result,
const float  defaultValue 
)

Gets float value of the first attribute of given name in a given parent node; returns given default value if not found.

bool Tiny2D::XMLNode::GetAttributeValueFloatArray ( const char *  name,
float *  result,
int  count 
)

Gets an array of floats (space separates) attribute value of the first attribute of given name in a given parent node; returns true on success.

bool Tiny2D::XMLNode::GetAttributeValueInt ( const char *  name,
int &  result 
)

Gets int value of the first attribute of given name in a given parent node; returns true on success.

void Tiny2D::XMLNode::GetAttributeValueInt ( const char *  name,
int &  result,
const int  defaultValue 
)

Gets int value of the first attribute of given name in a given parent node; returns given default value if not found.

XMLAttribute* Tiny2D::XMLNode::GetFirstAttribute ( const char *  name = NULL )

Gets first attribute of given name (or just first attribute if name is NULL) in a given parent node.

XMLNode* Tiny2D::XMLNode::GetFirstNode ( const char *  name = NULL )

Gets first node of given name (or just first node if name is NULL) in a given parent node.

const char* Tiny2D::XMLNode::GetName (  ) const

Gets node name.

XMLNode* Tiny2D::XMLNode::GetNext ( const char *  name = NULL )

Gets next node of given name (or just next node if name is NULL)

const char* Tiny2D::XMLNode::GetValue (  ) const

Gets node value.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines