27 #ifndef INCLUDED_CONFIGDB 28 #define INCLUDED_CONFIGDB 49 #define g_ConfigDB CConfigDB::GetSingleton() 53 static std::map<CStr, CConfigValueSet>
m_Map[];
169 #define CFG_GET_VAL(name, destination)\ 170 g_ConfigDB.GetValue(CFG_USER, name, destination) 172 #endif // INCLUDED_CONFIGDB
static CStr prefix
Definition: DllLoader.cpp:46
static VfsPath m_ConfigFile[]
Definition: ConfigDB.h:54
bool HasChanges(EConfigNamespace ns) const
Returns true if changed with respect to last write on file.
Definition: ConfigDB.cpp:118
Definition: ConfigDB.h:40
static bool m_HasChanges[]
Definition: ConfigDB.h:55
void GetValue(EConfigNamespace ns, const CStr &name, bool &value)
Attempt to retrieve the value of a config variable with the given name; will search CFG_COMMAND first...
Definition: ConfigDB.h:42
void SetValueString(EConfigNamespace ns, const CStr &name, const CStr &value)
Save a config value in the specified namespace.
Definition: ConfigDB.cpp:197
bool Reload(EConfigNamespace)
Reload the config file associated with the specified config namespace (the last config file path set ...
Definition: ConfigDB.cpp:234
void GetValues(EConfigNamespace ns, const CStr &name, CConfigValueSet &values) const
Attempt to retrieve a vector of values corresponding to the given setting; will search CFG_COMMAND fi...
Definition: ConfigDB.cpp:134
std::map< CStr, CConfigValueSet > GetValuesWithPrefix(EConfigNamespace ns, const CStr &prefix) const
Retrieve a map of values corresponding to settings whose names begin with the given prefix; will sear...
Definition: ConfigDB.cpp:176
Definition: ConfigDB.h:44
void RemoveValue(EConfigNamespace ns, const CStr &name)
Remove a config value in the specified namespace.
Definition: ConfigDB.cpp:215
EConfigNamespace GetValueNamespace(EConfigNamespace ns, const CStr &name) const
Returns the namespace that the value returned by GetValues was defined in, or CFG_LAST if it wasn't d...
Definition: ConfigDB.cpp:157
void SetChanges(EConfigNamespace ns, bool value)
Definition: ConfigDB.cpp:126
Definition: ConfigDB.h:39
bool WriteValueToFile(EConfigNamespace ns, const CStr &name, const CStr &value, const VfsPath &path)
Write a config value to the file specified by 'path'.
Definition: ConfigDB.cpp:441
static std::map< CStr, CConfigValueSet > m_Map[]
Definition: ConfigDB.h:53
void SetValueBool(EConfigNamespace ns, const CStr &name, const bool value)
Definition: ConfigDB.cpp:209
EConfigNamespace
Definition: ConfigDB.h:37
Definition: Singleton.h:34
void SetConfigFile(EConfigNamespace ns, const VfsPath &path)
Set the path to the config file used to populate the specified namespace Note that this function does...
Definition: ConfigDB.cpp:226
Definition: ConfigDB.h:51
CConfigDB()
Definition: ConfigDB.cpp:36
Definition: ConfigDB.h:43
bool WriteFile(EConfigNamespace ns, const VfsPath &path) const
Write the current state of the specified config namespace to the file specified by 'path'...
Definition: ConfigDB.cpp:405
Definition: ConfigDB.h:41
std::vector< CStr > CConfigValueSet
Definition: ConfigDB.h:47