#include <global.h>
Public Member Functions | |
| CConfiguration () | |
| ~CConfiguration () | |
| TiXmlElement * | findNode (char *name) |
| void | setRootNode (char *node) |
| bool | load (char *cfgFile) |
| void | save (char *cfgFile) |
| float | getFloat (char *str, float def=0.0) |
| double | getDouble (char *str, double def=0.0) |
| char * | getString (char *str, char *def="") |
| int | getInteger (char *str, int def=0) |
| bool | getBoolean (char *str, bool def=false) |
| void | setFloat (char *str, float value) |
| void | setDouble (char *str, double value) |
| void | setString (char *str, char *value) |
| void | setInteger (char *str, int value) |
| void | setBoolean (char *str, bool value) |
Static Public Member Functions | |
| static float | getAttributeFloat (TiXmlElement *node, char *str, float def=0.0) |
| static double | getAttributeDouble (TiXmlElement *node, char *str, double def=0.0) |
| static char * | getAttributeString (TiXmlElement *node, char *str, char *def="") |
| static int | getAttributeInteger (TiXmlElement *node, char *str, int def=0) |
| static bool | getAttributeBoolean (TiXmlElement *node, char *str, bool def=false) |
| static void | setAttributeFloat (TiXmlElement *node, char *str, float value) |
| static void | setAttributeDouble (TiXmlElement *node, char *str, double value) |
| static void | setAttributeString (TiXmlElement *node, char *str, char *value) |
| static void | setAttributeInteger (TiXmlElement *node, char *str, int value) |
| static void | setAttributeBoolean (TiXmlElement *node, char *str, bool value) |
Public Attributes | |
| char | rootNode [255] |
Private Attributes | |
| TiXmlDocument | doc |
Loads and stores configuration data (in a xml file). Set rootNode to root node of xml file first, then use setters and getters to access the data.
| CConfiguration::CConfiguration | ( | ) |
| CConfiguration::~CConfiguration | ( | ) |
| TiXmlElement * CConfiguration::findNode | ( | char * | name | ) |
| void CConfiguration::setRootNode | ( | char * | node | ) |
| bool CConfiguration::load | ( | char * | cfgFile | ) |
| void CConfiguration::save | ( | char * | cfgFile | ) |
| float CConfiguration::getFloat | ( | char * | str, | |
| float | def = 0.0 | |||
| ) |
| double CConfiguration::getDouble | ( | char * | str, | |
| double | def = 0.0 | |||
| ) |
| char * CConfiguration::getString | ( | char * | str, | |
| char * | def = "" | |||
| ) |
| int CConfiguration::getInteger | ( | char * | str, | |
| int | def = 0 | |||
| ) |
| bool CConfiguration::getBoolean | ( | char * | str, | |
| bool | def = false | |||
| ) |
| void CConfiguration::setFloat | ( | char * | str, | |
| float | value | |||
| ) |
| void CConfiguration::setDouble | ( | char * | str, | |
| double | value | |||
| ) |
| void CConfiguration::setString | ( | char * | str, | |
| char * | value | |||
| ) |
| void CConfiguration::setInteger | ( | char * | str, | |
| int | value | |||
| ) |
| void CConfiguration::setBoolean | ( | char * | str, | |
| bool | value | |||
| ) |
| float CConfiguration::getAttributeFloat | ( | TiXmlElement * | node, | |
| char * | str, | |||
| float | def = 0.0 | |||
| ) | [static] |
| double CConfiguration::getAttributeDouble | ( | TiXmlElement * | node, | |
| char * | str, | |||
| double | def = 0.0 | |||
| ) | [static] |
| char * CConfiguration::getAttributeString | ( | TiXmlElement * | node, | |
| char * | str, | |||
| char * | def = "" | |||
| ) | [static] |
| int CConfiguration::getAttributeInteger | ( | TiXmlElement * | node, | |
| char * | str, | |||
| int | def = 0 | |||
| ) | [static] |
| bool CConfiguration::getAttributeBoolean | ( | TiXmlElement * | node, | |
| char * | str, | |||
| bool | def = false | |||
| ) | [static] |
| void CConfiguration::setAttributeFloat | ( | TiXmlElement * | node, | |
| char * | str, | |||
| float | value | |||
| ) | [static] |
| void CConfiguration::setAttributeDouble | ( | TiXmlElement * | node, | |
| char * | str, | |||
| double | value | |||
| ) | [static] |
| void CConfiguration::setAttributeString | ( | TiXmlElement * | node, | |
| char * | str, | |||
| char * | value | |||
| ) | [static] |
| void CConfiguration::setAttributeInteger | ( | TiXmlElement * | node, | |
| char * | str, | |||
| int | value | |||
| ) | [static] |
| void CConfiguration::setAttributeBoolean | ( | TiXmlElement * | node, | |
| char * | str, | |||
| bool | value | |||
| ) | [static] |
TiXmlDocument CConfiguration::doc [private] |
| char CConfiguration::rootNode[255] |
1.5.2