#include <KeosXMLConfigFile.h>
Public Member Functions | |
| CXMLConfigFile () | |
| Constructor. | |
| virtual | ~CXMLConfigFile () |
| Destructor. | |
| bool | Load (const String &strFilename) |
| Load from a file name. | |
| bool | Save (const String &strFilename, ConfigOptionMap ConfigMap) |
| Save ConfigOptionMap in a file. | |
| String | GetSetting (const String &strKey) const |
| Get the setting value from the setting name. | |
| SettingsMap & | GetSettingsMap (void) |
| Get the settings map. | |
| void | Clear (void) |
| Clear the settings. | |
Protected Attributes | |
| SettingsMap | m_Settings |
| Map of all the settings. | |
The file must be in a format like that : <?xml version="1.0" encoding="UTF-8"?> <properties> <property name="videomode" value="1024x768"> <property name="colordepth" value="32"> <property name="fullscreen" value="no"> </properties>
Definition at line 39 of file KeosXMLConfigFile.h.
| Keos::CXMLConfigFile::CXMLConfigFile | ( | ) |
| Keos::CXMLConfigFile::~CXMLConfigFile | ( | ) | [virtual] |
| bool Keos::CXMLConfigFile::Load | ( | const String & | strFilename | ) |
Load from a file name.
| strFilename | Path of the XML config file. |
Definition at line 48 of file KeosXMLConfigFile.cpp.
References Keos::ILogger::Log(), and m_Settings.
Referenced by Keos::CRoot::RestoreConfig().
| bool Keos::CXMLConfigFile::Save | ( | const String & | strFilename, | |
| ConfigOptionMap | ConfigMap | |||
| ) |
Save ConfigOptionMap in a file.
| strFilename | Path of the XML config file. | |
| ConfigMap | Map which contains the configuration options. |
Definition at line 87 of file KeosXMLConfigFile.cpp.
References Keos::CSingleton< T >::Instance().
Referenced by Keos::CRoot::SaveConfig().
Get the setting value from the setting name.
| strKey | The name of the setting. |
Definition at line 134 of file KeosXMLConfigFile.cpp.
References Keos::CStringUtil::BLANK, and m_Settings.
Referenced by Keos::CRoot::RestoreConfig().
| SettingsMap& Keos::CXMLConfigFile::GetSettingsMap | ( | void | ) | [inline] |
Get the settings map.
Definition at line 72 of file KeosXMLConfigFile.h.
Referenced by Keos::CRoot::RestoreConfig().
| void Keos::CXMLConfigFile::Clear | ( | void | ) |
Clear the settings.
Definition at line 42 of file KeosXMLConfigFile.cpp.
References m_Settings.
Referenced by ~CXMLConfigFile().
SettingsMap Keos::CXMLConfigFile::m_Settings [protected] |
Map of all the settings.
Definition at line 84 of file KeosXMLConfigFile.h.
Referenced by Clear(), GetSetting(), and Load().
1.5.1-p1