Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes
cat::Settings Class Reference

#include <Settings.hpp>

Inheritance diagram for cat::Settings:

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

SettingsKeyaddKey (const char *name)
void clear ()
SettingsKeygetKey (const char *name)
SettingsKeyinitInt (const char *name, int n, bool overwrite)
SettingsKeyinitStr (const char *name, const char *value, bool overwrite)

Protected Attributes

std::string _settings_file
SettingsKeyhbtrees [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

Definition at line 76 of file Settings.hpp.

std::string cat::Settings::_settings_file [protected]

Definition at line 87 of file Settings.hpp.

Definition at line 82 of file Settings.hpp.

const u32 cat::Settings::KEY_HASH_SALT = 0xbaddecaf [static, protected]

Definition at line 79 of file Settings.hpp.

Definition at line 85 of file Settings.hpp.

Definition at line 84 of file Settings.hpp.

const int cat::Settings::SETTINGS_HASH_BINS = 256 [static, protected]

Definition at line 80 of file Settings.hpp.


The documentation for this class was generated from the following file:

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net