LRT
12
|
A Singleton that stores and retrieves configuration values from a file. More...
#include <Config.h>
Public Member Functions | |
void | Load () |
Updates all the values from the configuration file. This may overwrites changes you made. | |
void | Save () |
Saves all the values to the configuration file. | |
void | UpdateAssignableDials () |
Updates the values of the values linked to assignable dials. | |
template<typename T > | |
T | Get (string section, string key, T defaultValue) |
Retreives the value of the given config value. You must specify a default value. | |
template<typename T > | |
void | Set (string section, string key, T val) |
Sets the value of the given config value. This does not save it to the file until you call Save(). | |
void | CheckForFileUpdates () |
updates the file if it has been changed since the last time it has been loaded. | |
Static Public Member Functions | |
static Config & | GetInstance () |
The accessor method for the global instance of this class. | |
static void | RegisterConfigurable (Configurable *configurable) |
register a listener that is notified when configure all is called. | |
static void | ConfigureAll () |
Call the Configure() methods of all the registered configurables. | |
Static Public Attributes | |
static const int | kNumAnalogAssignable = 4 |
number of analog dials available to the programmer. |
A Singleton that stores and retrieves configuration values from a file.