Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Common::ConfigManager Class Reference

#include <config-manager.h>

Inheritance diagram for Common::ConfigManager:

Common::Singleton< T >

List of all members.

Detailed Description

The (singleton) configuration manager, used to query & set configuration values using string keys.

Implement the callback based notification system (outlined below) which sends out notifications to interested parties whenever the value of some specific (or any) configuration key changes.

Definition at line 48 of file config-manager.h.

Public Types

typedef Map< String, Domain,
IgnoreCaseComparator > 

Public Member Functions

void flushToDisk ()
const String & get (const String &key, const String &dom=String::emptyString) const
const String & getActiveDomain () const
bool getBool (const String &key, const String &dom=String::emptyString) const
const DomainMapgetGameDomains () const
int getInt (const String &key, const String &dom=String::emptyString) const
bool hasGameDomain (const String &domain) const
bool hasKey (const String &key, const String &dom) const
bool hasKey (const String &key) const
void loadConfigFile (const String &filename)
void loadDefaultConfigFile ()
void registerDefault (const String &key, bool value)
void registerDefault (const String &key, int value)
void registerDefault (const String &key, const char *value)
void registerDefault (const String &key, const String &value)
void removeGameDomain (const String &name)
void removeKey (const String &key, const String &dom)
void renameGameDomain (const String &oldName, const String &newName)
void set (const String &key, bool value, const String &dom=String::emptyString)
void set (const String &key, int value, const String &dom=String::emptyString)
void set (const String &key, const char *value, const String &dom=String::emptyString)
void set (const String &key, const String &value, const String &dom=String::emptyString)
void setActiveDomain (const String &domain)

Static Public Member Functions

static T & instance ()

Static Public Attributes

static const String kApplicationDomain
static const String kTransientDomain

Protected Types

typedef T SingletonBaseType

Private Member Functions

void loadFile (const String &filename)
void writeDomain (FILE *file, const String &name, const Domain &domain)

Private Attributes

String _activeDomain
Domain _defaultsDomain
StringList _domainSaveOrder
String _filename
DomainMap _gameDomains
DomainMap _globalDomains
Domain _transientDomain


class Singleton< SingletonBaseType >


class  Domain

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

Generated by  Doxygen 1.6.0   Back to index