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 > Common::NonCopyable

List of all members.


Detailed Description

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

Todo:
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 49 of file config-manager.h.


Public Types

typedef HashMap< String,
Domain, IgnoreCase_Hash,
IgnoreCase_EqualTo > 
DomainMap

Public Member Functions

void addGameDomain (const String &domName)
void flushToDisk ()
const Stringget (const String &key, const String &domName) const
const Stringget (const String &key) const
const Domain * getActiveDomain () const
Domain * getActiveDomain ()
const StringgetActiveDomainName () const
bool getBool (const String &key, const String &domName=String::emptyString) const
const Domain * getDomain (const String &domName) const
Domain * getDomain (const String &domName)
const DomainMapgetGameDomains () const
int getInt (const String &key, const String &domName=String::emptyString) const
bool hasGameDomain (const String &domName) const
bool hasKey (const String &key, const String &domName) 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 &domName)
void removeKey (const String &key, const String &domName)
void renameGameDomain (const String &oldName, const String &newName)
void set (const String &key, const String &value, const String &domName)
void set (const String &key, const String &value)
void setActiveDomain (const String &domName)
void setBool (const String &key, bool value, const String &domName=String::emptyString)
void setInt (const String &key, int value, const String &domName=String::emptyString)

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 (WriteStream &stream, const String &name, const Domain &domain)

Private Attributes

Domain * _activeDomain
String _activeDomainName
Domain _appDomain
Domain _defaultsDomain
StringList _domainSaveOrder
String _filename
DomainMap _gameDomains
Domain _transientDomain

Friends

class Singleton< SingletonBaseType >

Classes

class  Domain

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

Generated by  Doxygen 1.6.0   Back to index