|
Public Member Functions |
| | Config (irr::IrrlichtDevice *d) |
|
| ~Config () |
| | Destructor.
|
| void | loadConfig (irr::c8 *fileName) |
| void | safeConfig (irr::c8 *description, irr::c8 *fileName) |
| void | safeDefaultConfig (const irr::c8 *fileName) |
| virtual void | setParameter (const irr::c8 *parameterName, const irr::c8 *value) |
| virtual const irr::c8 * | getParameter (const irr::c8 *parameterName) |
|
virtual void | setParameter (const irr::c8 *parameterName, bool value) |
| | Sets a parameter as boolean value.
|
| virtual bool | getParameterAsBool (const irr::c8 *parameterName) |
|
virtual void | setParameter (const irr::c8 *parameterName, irr::s32 value) |
| | Sets a parameter as integer value.
|
| virtual irr::s32 | getParameterAsInt (const irr::c8 *parameterName) |
|
virtual void | setParameter (const irr::c8 *parameterName, irr::f32 value) |
| | Sets a parameter as float value.
|
| virtual irr::f32 | getParameterAsFloat (const irr::c8 *parameterName) |
|
virtual irr::s32 | getParameterCount () |
| | Returns amount of string parameters set in this scene manager.
|
| virtual const irr::c8 * | getParameterName (irr::s32 index) |
| virtual const irr::c8 * | getParameterValue (irr::s32 index) |
Classes |
| struct | SStringPair |
Game config data is stored to disk in simple XML format. To do so, just create a Config object, set some Parametes using the set() functions and safe to disk. Setting Parameters is done with a uniuqe parameter Name followed by a value. Reading game config Parameters is done by creating a Config object, then load() a file. Calling get() functions returns then Paramter values by a given name (null terminated string). This class is based on irr::IStringParameters.