In file appconf.h:

class RegistryConfig : public BaseConfig

RegistryConfig uses Win32 registry API to store configuration info

Inheritance:

RegistryConfig < BaseConfig


Public

Constructors and destructor
RegistryConfig(const char *szRootKey)
Ctor takes a string - root for our keys in registry.
~RegistryConfig()
dtor frees the resources
Implementation of inherited pure virtual functions
const char* readEntry(const char *szKey, const char *szDefault = NULL)
long int readEntry(const char *szKey, long int Default) const
double readEntry(const char *szKey, double Default) const
Bool writeEntry(const char *szKey, const char *szValue)
Bool writeEntry(const char *szKey, long int Value)
Bool writeEntry(const char *szKey, double Value)
Bool deleteEntry(const char *szKey)
Enumeration
Enumerator* enumSubgroups() const
Enumerate subgroups of the current group
Enumerator* enumEntries() const
Enumerate entries of the current group

Inherited from BaseConfig:

Public Methods

void recordDefaults(Bool enable = TRUE)

Public

Set and retrieve current path

virtual void setCurrentPath(const char *szPath = "")
Specify the new current path by its absolute name
virtual void changeCurrentPath(const char *szPath = "")
Change the current path
const char* getCurrentPath() const
Query the current path
static char* normalizePath(const char *szStartPath, const char *szPath)
Resolve "

Enumeration of subgroups/entries

class Enumerator
Class that supports enumeration.
size_t Count() const
return number of elements
const char* operator[](size_t nIndex) const
return the element #nIndex
virtual Enumerator* enumSubgroups() const
Enumerate subgroups of the current group
virtual Enumerator* enumEntries() const
Enumerate entries of the current group

Key access

virtual const char* readEntry(const char *szKey, const char *szDefault = NULL) const
Get the value of an entry, or the default value
long int readEntry(const char *szKey, long int Default) const
Get the value of an entry, or the default value, interpreted as a long integer
double readEntry(const char *szKey, double Default) const
Get the value of an entry, or the default value, interpreted as a double value
virtual Bool writeEntry(const char *szKey, const char *szValue)
Set the value of an entry
Bool writeEntry(const char *szKey, long int Value)
Set the value of an entry to a long int value
Bool writeEntry(const char *szKey, double Value)
Set the value of an entry to a double value
virtual Bool deleteEntry(const char *szKey)
Deletes the entry.

Other functions

virtual Bool flush(Bool = FALSE)
permanently writes changes, returns TRUE on success
Bool isInitialized() const
returns TRUE if object was correctly initialized

Filter functions.

static char* filterOut(const char *szValue)
should be called from writeEntry, returns pointer to dynamic buffer
static char* filterIn(const char *szValue)
should be called from readEntry, returns pointer to dynamic buffer
void expandVariables(Bool bExpand = TRUE)
should environment variables be automatically expanded?
Bool doesExpandVariables(void) const
do environment variables get automatically expanded?

Protected Fields

Bool m_bOk
Bool m_bExpandVariables
Bool m_bRecordDefaults

Documentation

RegistryConfig uses Win32 registry API to store configuration info
Constructors and destructor

RegistryConfig(const char *szRootKey)
szRootKey is the name of the top registry key (relative to HKLM\Software for system-wide settings and to HKCU\Software for user settings)

~RegistryConfig()
dtor frees the resources

Implementation of inherited pure virtual functions

const char* readEntry(const char *szKey, const char *szDefault = NULL)

long int readEntry(const char *szKey, long int Default) const

double readEntry(const char *szKey, double Default) const

Bool writeEntry(const char *szKey, const char *szValue)

Bool writeEntry(const char *szKey, long int Value)

Bool writeEntry(const char *szKey, double Value)

Bool deleteEntry(const char *szKey)

Enumeration
See Also:
Enumerator, BaseConfig::enumSubgroups, BaseConfig::enumEntries

Enumerator* enumSubgroups() const
Enumerate subgroups of the current group

Enumerator* enumEntries() const
Enumerate entries of the current group


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de