![]() |
Pixel Dust Game Engine
v0.9.5
|
Public Member Functions | |
virtual bool | useConfig (const char *inConfigName)=0 |
virtual bool | getConfigString (const char *configItemName, std::string &outString)=0 |
virtual bool | getConfigLong (const char *configItemName, long &outLongValue)=0 |
virtual bool | getConfigFloat (const char *configItemName, float &outFloatValue)=0 |
virtual bool | getConfigBool (const char *configItemName, bool &outBooleanValue)=0 |
virtual void | setConfigString (const char *configItemName, std::string inString)=0 |
virtual void | setConfigLong (const char *configItemName, long inLongValue)=0 |
virtual void | setConfigFloat (const char *configItemName, float inFloatValue)=0 |
virtual void | setConfigBool (const char *configItemName, bool inBooleanValue)=0 |
![]() | |
Singleton () | |
virtual | ~Singleton () |
Static Protected Member Functions | |
static ConfigManager * | createSingletonInstance () |
create the one and only singleton instance of the ConfigManager used by the pdg engine | |
Friends | |
class | Singleton< ConfigManager > |
Additional Inherited Members | |
![]() | |
static ConfigManager * | getSingletonInstance () |
static bool | hasInstance () |
static ConfigManager & | instance () |
static void | setInstance (ConfigManager *i) |
static ConfigManager * | createSingletonInstance () |
Interface to Save and Load game config values. This class is a pure virtual (interface) class that provides simple configuration management. It does the right thing on each platform to save and load values that need to persist between game sessions. It is not intended to be used to hold saved games. It is not dependent on any other parts of the Pixel Dust Game Framework.
|
staticprotected |
create the one and only singleton instance of the ConfigManager used by the pdg engine
|
pure virtual |
Get a config value as a boolean. Search the current configuration for a config entry with the same name and return the value associated with it as a boolean value
configItemName | name of item to search for in config, case insensitive |
outBooleanValue | holds config boolean value if found |
|
pure virtual |
Get a config value as a floating point number. Search the current configuration for a config entry with the same name and return the value associated with it as a floating point value
configItemName | name of item to search for in config, case insensitive |
outFloatValue | holds config float value if found |
|
pure virtual |
Get a config value as a long integer. Search the current configuration for a config entry with the same name and return the value associated with it as a long integer value
configItemName | name of item to search for in config, case insensitive |
outLongValue | holds config long integer value if found |
|
pure virtual |
Get a config value as a string. Search the current configuration for a config entry with the same name and return the value associated with it as a string returns false if not found, true if found and value returned via outString
configItemName | name of item to search for in config, case insensitive |
outString | holds config string value if found |
|
pure virtual |
Add or change a config boolean value. If no config item with that name exists, one is added. Changes to the config are saved immediately. You should always use the corresponding getConfigBool call to retrieve any value stored with setConfigBool.
configItemName | name of item in config to change or add, case not preserved |
inBooleanValue | the new boolean value for the config item |
|
pure virtual |
Add or change a config floating point value. If no config item with that name exists, one is added. Changes to the config are saved immediately. You should always use the corresponding getConfigFloat call to retrieve any value stored with setConfigFloat.
configItemName | name of item in config to change or add, case not preserved |
inFloatValue | the new floating point value for the config item |
|
pure virtual |
Add or change a config long integer value. If no config item with that name exists, one is added. Changes to the config are saved immediately. You should always use the corresponding getConfigLong call to retrieve any value stored with setConfigLong.
configItemName | name of item in config to change or add, case not preserved |
inLongValue | the new long integer value for the config item |
|
pure virtual |
Add or change a config value string. If no config item with that name exists, one is added. Changes to the config are saved immediately. You should always use the corresponding getConfigString call to retrieve any value stored with setConfigString.
configItemName | name of item in config to change or add, case not preserved |
inString | the new string value for the config item |
|
pure virtual |
Specify the name of the configuration to use. Specify an abstract name for the config to be used. Implementations will use this to build the name of a file on disk, a registry entry, or something else that's appropriate for the platform you are running on.
inConfigName | Only alpha characters (uppercase and lowercase) are allowed, name is case insensitive |
|
friend |