class ConfigFile

ConfigFile loads and saves configuration files which can be represented as simple key/value pairs of strings. More...

Full namefun::ConfigFile
Definition#include <fun/ConfigFile.h>
Inheritsfun::PropertyList [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Public Static Methods


Detailed Description

ConfigFile loads and saves configuration files which can be represented as simple key/value pairs of strings. They can be loaded from & saved to plain text or XML files.

The most interesting methods are probably getString(), getInt(), etc., as those are how you get at the configuration values loaded from file. If you need to know whether a value was explicitly set in the file, use isSet(). That might be a little cumbersome; hopefully there aren't that many cases where it will matter whether a value was explicitly set, or couldn't be interpreted as an int or whatever.

The text format used will treat lines ending in "\" as continued on the next line. \t and \n will be expanded into tab and newline during reading, and will be escaped again during writing.

 ConfigFile ( const QString &filename = QString() )

ConfigFile

 ~ConfigFile ()

~ConfigFile

void  deserialize (const Deserializer &node)

deserialize

[virtual]

Reimplemented from PropertyList.

void  serialize (Serializer &node)

serialize

[const virtual]

Reimplemented from PropertyList.

bool  loadFromXML ( const QString &filename = QString() )

loadFromXML

[virtual slot]

Loads this ConfigFile from the given file. If filename is empty, this->getFilename() will be used.

bool  saveToXML (const QString &filename=QString())

saveToXML

[const virtual slot]

Saves this ConfigFile to the given file. If filename is empty, this->getFilename() will be used.

bool  save ()

save

[virtual slot]

bool  load ()

load

[virtual slot]

bool  loadFromText ( std::istream &is)

loadFromText

[slot]

Loads this ConfigFile from the given input stream.

bool  saveToText ( std::ostream &os)

saveToText

[const slot]

Stores this ConfigFile to the given output stream.

void  setFilename ( const QString &fn )

setFilename

[slot]

QString  getFilename ()

getFilename

[slot]

ConfigFile &  funConfig ()

funConfig

[static slot]


Generated by: stephan on cheyenne on Mon Aug 11 14:06:52 2003, using kdoc 2.0a54.