![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXSettings.h>
Public Member Functions | |
FXSettings () | |
FXSettings (const FXSettings &orig) | |
FXSettings & | operator= (const FXSettings &orig) |
bool | parseFile (const FXString &filename, bool mark) |
bool | unparseFile (const FXString &filename) |
FXStringDict * | data (FXuint pos) const |
FXStringDict * | find (const FXchar *section) const |
FXint | readFormatEntry (const FXchar *section, const FXchar *key, const FXchar *fmt,...) FX_SCANF(4 |
FXint const FXchar * | readStringEntry (const FXchar *section, const FXchar *key, const FXchar *def=NULL) |
FXint | readIntEntry (const FXchar *section, const FXchar *key, FXint def=0) |
FXuint | readUnsignedEntry (const FXchar *section, const FXchar *key, FXuint def=0) |
FXdouble | readRealEntry (const FXchar *section, const FXchar *key, FXdouble def=0.0) |
FXColor | readColorEntry (const FXchar *section, const FXchar *key, FXColor def=0) |
FXbool | readBoolEntry (const FXchar *section, const FXchar *key, FXbool def=FALSE) |
FXint | writeFormatEntry (const FXchar *section, const FXchar *key, const FXchar *fmt,...) FX_PRINTF(4 |
FXint bool | writeStringEntry (const FXchar *section, const FXchar *key, const FXchar *val) |
bool | writeIntEntry (const FXchar *section, const FXchar *key, FXint val) |
bool | writeUnsignedEntry (const FXchar *section, const FXchar *key, FXuint val) |
bool | writeRealEntry (const FXchar *section, const FXchar *key, FXdouble val) |
bool | writeColorEntry (const FXchar *section, const FXchar *key, FXColor val) |
bool | writeBoolEntry (const FXchar *section, const FXchar *key, FXbool val) |
bool | deleteEntry (const FXchar *section, const FXchar *key) |
bool | existingEntry (const FXchar *section, const FXchar *key) |
bool | deleteSection (const FXchar *section) |
bool | existingSection (const FXchar *section) |
bool | clear () |
void | setModified (bool mdfy=true) |
bool | isModified () const |
virtual | ~FXSettings () |
![]() | |
FXDict () | |
FXDict (const FXDict &orig) | |
FXDict & | operator= (const FXDict &orig) |
void | size (FXint m) |
FXint | size () const |
FXint | no () const |
void * | insert (const FXchar *ky, const void *ptr, bool mrk=false) |
void * | replace (const FXchar *ky, const void *ptr, bool mrk=false) |
void * | remove (const FXchar *ky) |
void * | find (const FXchar *ky) const |
bool | empty (FXint pos) const |
const FXchar * | key (FXuint pos) const |
void * | data (FXuint pos) const |
bool | mark (FXuint pos) const |
FXint | first () const |
FXint | last () const |
FXint | next (FXint pos) const |
FXint | prev (FXint pos) const |
void | clear () |
virtual | ~FXDict () |
![]() | |
virtual long | onDefault (FXObject *, FXSelector, void *) |
const FXchar * | getClassName () const |
bool | isMemberOf (const FXMetaClass *metaclass) const |
virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXObject () |
The Settings class manages a key-value database.
This is normally used as part of Registry, but can also be used separately in applications that need to maintain a key-value database in a file of their own. String values can contain any character, and will be escaped when written to the file.
FX::FXSettings::FXSettings | ( | ) |
Construct settings database.
FX::FXSettings::FXSettings | ( | const FXSettings & | orig | ) |
Construct copy of existing database.
|
virtual |
Cleanup.
FXSettings& FX::FXSettings::operator= | ( | const FXSettings & | orig | ) |
Assignment operator.
bool FX::FXSettings::parseFile | ( | const FXString & | filename, |
bool | mark | ||
) |
Parse a file containing a settings database.
bool FX::FXSettings::unparseFile | ( | const FXString & | filename | ) |
Unparse settings database into given file.
|
inline |
Obtain the string dictionary for the given section.
References FX::FXDict::data().
|
inline |
Find string dictionary for the given section; may be NULL.
References FX::FXDict::find().
FXint FX::FXSettings::readFormatEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
const FXchar * | fmt, | ||
... | |||
) |
Read a formatted registry entry, using scanf-style format.
FXint const FXchar* FX::FXSettings::readStringEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
const FXchar * | def = NULL |
||
) |
Read a string registry entry; if no value is found, the default value def is returned.
Read a integer registry entry; if no value is found, the default value def is returned.
FXuint FX::FXSettings::readUnsignedEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
FXuint | def = 0 |
||
) |
Read a unsigned integer registry entry; if no value is found, the default value def is returned.
FXdouble FX::FXSettings::readRealEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
FXdouble | def = 0.0 |
||
) |
Read a double-precision floating point registry entry; if no value is found, the default value def is returned.
FXColor FX::FXSettings::readColorEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
FXColor | def = 0 |
||
) |
Read a color value registry entry; if no value is found, the default value def is returned.
FXbool FX::FXSettings::readBoolEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
FXbool | def = FALSE |
||
) |
Read a boolean registry entry.
FXint FX::FXSettings::writeFormatEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
const FXchar * | fmt, | ||
... | |||
) |
Write a formatted registry entry, using printf-style format.
FXint bool FX::FXSettings::writeStringEntry | ( | const FXchar * | section, |
const FXchar * | key, | ||
const FXchar * | val | ||
) |
Write a string registry entry.
Write a integer registry entry.
Write a unsigned integer registry entry.
Write a double-precision floating point registry entry.
Write a color value entry.
Write a boolean value entry.
Delete a registry entry.
See if entry exists.
bool FX::FXSettings::deleteSection | ( | const FXchar * | section | ) |
Delete section.
bool FX::FXSettings::existingSection | ( | const FXchar * | section | ) |
See if section exists.
bool FX::FXSettings::clear | ( | ) |
Clear all sections.
|
inline |
Mark as changed.
|
inline |
Is it modified.
![]() |