#include <configuration.h>

Definition at line 185 of file configuration.h.
Public Member Functions | |
| virtual | ~Configuration () |
| void | init (const std::string &filename) |
| Reads config file and parse all options into memory. | |
| void | write () |
| Writes the current settings back to the config file. | |
| void | addListener (const std::string &key, ConfigListener *listener) |
| Adds a listener to the listen list of the specified config option. | |
| void | removeListener (const std::string &key, ConfigListener *listener) |
| Removes a listener from the listen list of the specified config option. | |
| void | setValue (const std::string &key, const std::string &value) |
| Sets an option using a string value. | |
| void | setValue (const std::string &key, float value) |
| void | setValue (const std::string &key, double value) |
| void | setValue (const std::string &key, int value) |
| void | setValue (const std::string &key, unsigned value) |
| void | setValue (const std::string &key, bool value) |
Private Types | |
| typedef std::list < ConfigListener * > | Listeners |
| typedef Listeners::iterator | ListenerIterator |
| typedef std::map< std::string, Listeners > | ListenerMap |
| typedef ListenerMap::iterator | ListenerMapIterator |
Private Attributes | |
| ListenerMap | mListenerMap |
| std::string | mConfigPath |
| Location of config file. | |
typedef std::list<ConfigListener*> Configuration::Listeners [private] |
Definition at line 231 of file configuration.h.
typedef Listeners::iterator Configuration::ListenerIterator [private] |
Definition at line 232 of file configuration.h.
typedef std::map<std::string, Listeners> Configuration::ListenerMap [private] |
Definition at line 233 of file configuration.h.
typedef ListenerMap::iterator Configuration::ListenerMapIterator [private] |
Definition at line 234 of file configuration.h.
| virtual Configuration::~Configuration | ( | ) | [inline, virtual] |
Definition at line 188 of file configuration.h.
| void Configuration::init | ( | const std::string & | filename | ) |
Reads config file and parse all options into memory.
| filename | path to config file |
Definition at line 134 of file configuration.cpp.
| void Configuration::write | ( | ) |
Writes the current settings back to the config file.
Definition at line 197 of file configuration.cpp.
| void Configuration::addListener | ( | const std::string & | key, | |
| ConfigListener * | listener | |||
| ) |
Adds a listener to the listen list of the specified config option.
Definition at line 229 of file configuration.cpp.
| void Configuration::removeListener | ( | const std::string & | key, | |
| ConfigListener * | listener | |||
| ) |
Removes a listener from the listen list of the specified config option.
Definition at line 235 of file configuration.cpp.
| void Configuration::setValue | ( | const std::string & | key, | |
| const std::string & | value | |||
| ) | [virtual] |
Sets an option using a string value.
| key | Option identifier. | |
| value | Value. |
Reimplemented from ConfigurationObject.
Definition at line 35 of file configuration.cpp.
| void Configuration::setValue | ( | const std::string & | key, | |
| float | value | |||
| ) | [inline] |
Definition at line 215 of file configuration.h.
| void Configuration::setValue | ( | const std::string & | key, | |
| double | value | |||
| ) | [inline] |
Definition at line 218 of file configuration.h.
| void Configuration::setValue | ( | const std::string & | key, | |
| int | value | |||
| ) | [inline] |
Definition at line 221 of file configuration.h.
| void Configuration::setValue | ( | const std::string & | key, | |
| unsigned | value | |||
| ) | [inline] |
Definition at line 224 of file configuration.h.
| void Configuration::setValue | ( | const std::string & | key, | |
| bool | value | |||
| ) | [inline] |
Definition at line 227 of file configuration.h.
ListenerMap Configuration::mListenerMap [private] |
Definition at line 235 of file configuration.h.
std::string Configuration::mConfigPath [private] |
1.5.5