#include <Settings.hpp>
List of all members.
Public Member Functions |
| int | getInt (const char *name) |
| int | getInt (const char *name, int init) |
| const char * | getStr (const char *name) |
| const char * | getStr (const char *name, const char *init) |
| void | readSettingsFromBuffer (const char *data, int len) |
| void | readSettingsFromFile (const char *file_path="settings.txt", const char *override_file="override.txt") |
| void | setInt (const char *name, int n) |
| void | setStr (const char *name, const char *value) |
| void | write () |
Protected Member Functions |
| SettingsKey * | addKey (const char *name) |
| void | clear () |
| SettingsKey * | getKey (const char *name) |
| SettingsKey * | initInt (const char *name, int n, bool overwrite) |
| SettingsKey * | initStr (const char *name, const char *value, bool overwrite) |
Protected Attributes |
| std::string | _settings_file |
| SettingsKey * | hbtrees [SETTINGS_HASH_BINS] |
| bool | modified |
| bool | readSettings |
Static Protected Attributes |
| static const u32 | KEY_HASH_SALT = 0xbaddecaf |
| static const int | SETTINGS_HASH_BINS = 256 |
Private Member Functions |
| | CAT_SINGLETON (Settings) |
Private Attributes |
| Mutex | _lock |
Detailed Description
Definition at line 72 of file Settings.hpp.
Member Function Documentation
| SettingsKey* cat::Settings::addKey |
( |
const char * |
name | ) |
[protected] |
| cat::Settings::CAT_SINGLETON |
( |
Settings |
| ) |
[private] |
| void cat::Settings::clear |
( |
| ) |
[protected] |
| int cat::Settings::getInt |
( |
const char * |
name | ) |
|
| int cat::Settings::getInt |
( |
const char * |
name, |
|
|
int |
init |
|
) |
| |
| SettingsKey* cat::Settings::getKey |
( |
const char * |
name | ) |
[protected] |
| const char* cat::Settings::getStr |
( |
const char * |
name, |
|
|
const char * |
init |
|
) |
| |
| const char* cat::Settings::getStr |
( |
const char * |
name | ) |
|
| SettingsKey* cat::Settings::initInt |
( |
const char * |
name, |
|
|
int |
n, |
|
|
bool |
overwrite |
|
) |
| [protected] |
| SettingsKey* cat::Settings::initStr |
( |
const char * |
name, |
|
|
const char * |
value, |
|
|
bool |
overwrite |
|
) |
| [protected] |
| void cat::Settings::readSettingsFromBuffer |
( |
const char * |
data, |
|
|
int |
len |
|
) |
| |
| void cat::Settings::readSettingsFromFile |
( |
const char * |
file_path = "settings.txt", |
|
|
const char * |
override_file = "override.txt" |
|
) |
| |
| void cat::Settings::setInt |
( |
const char * |
name, |
|
|
int |
n |
|
) |
| |
| void cat::Settings::setStr |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
| void cat::Settings::write |
( |
| ) |
|
Member Data Documentation
The documentation for this class was generated from the following file: