#include <configuration.h>
Definition at line 58 of file configuration.h.
Public Member Functions | |
| void | init (const std::string &filename) |
| Reads INI file and parse all options into memory. | |
| void | write () |
| Writes the current settings back to an ini-file. | |
| void | setValue (const std::string &key, std::string value) |
| Sets an option using a string value. | |
| void | setValue (const std::string &key, float value) |
| Sets an option using a numeric value. | |
| std::string | getValue (const std::string &key, std::string deflt) |
| Gets a value as string. | |
| float | getValue (const std::string &key, float deflt) |
| Gets a value as numeric (float). | |
| 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. | |
Private Attributes | |
| std::map< std::string, std::string > | options |
| std::map< std::string, std::list< ConfigListener * > > | listeners |
| std::string | configPath |
| Location of config file. | |
|
||||||||||||
|
Adds a listener to the listen list of the specified config option.
Definition at line 174 of file configuration.cpp. |
|
||||||||||||
|
Gets a value as numeric (float).
Definition at line 165 of file configuration.cpp. |
|
||||||||||||
|
Gets a value as string.
Definition at line 156 of file configuration.cpp. |
|
|
Reads INI file and parse all options into memory.
Definition at line 44 of file configuration.cpp. |
|
||||||||||||
|
Removes a listener from the listen list of the specified config option.
Definition at line 180 of file configuration.cpp. |
|
||||||||||||
|
Sets an option using a numeric value.
Definition at line 145 of file configuration.cpp. |
|
||||||||||||
|
Sets an option using a string value.
Definition at line 124 of file configuration.cpp. |
|
|
Writes the current settings back to an ini-file.
Definition at line 88 of file configuration.cpp. |
|
|
Location of config file.
Definition at line 116 of file configuration.h. |
|
|
Definition at line 114 of file configuration.h. |
|
|
Definition at line 113 of file configuration.h. |
1.3.9.1