Main Page   Class Hierarchy   Compound List   File List   Compound Members  

config::KSimpleConfig Class Reference

KDE Configuration entries KDE Configuration Management class with deletion ability. More...

#include <ksimpleconfig.h>

Inheritance diagram for config::KSimpleConfig:

config::KConfig config::KConfigBase List of all members.

Public Methods

 KSimpleConfig (const string &fileName, bool bReadOnly=false)
 Construct a KSimpleConfig object and make it either read-write or read-only. More...

virtual ~KSimpleConfig ()
 Destructor. More...

virtual void sync ()
 Flushes all changes that currently reside only in memory back to disk / permanent storage. More...


Protected Methods

virtual void virtual_hook (int id, void *data)

Detailed Description

KDE Configuration entries KDE Configuration Management class with deletion ability.

This is a trivial extension of KConfig for applications that need only one configuration file and no default system. A difference with KConfig is that when the data in memory is written back it is not merged with what is on disk. Whatever is in memory simply replaces what is on disk entirely.

Author:
Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
Version:
Id:
ksimpleconfig.h,v 1.1.1.1 2002/12/01 04:08:23 zl Exp
See also:
KConfigBase KConfig


Constructor & Destructor Documentation

config::KSimpleConfig::KSimpleConfig const string &    fileName,
bool    bReadOnly = false
 

Construct a KSimpleConfig object and make it either read-write or read-only.

Parameters:
pFileName  The file used for saving the config data. Either a full path can be specified or just the filename. If only a filename is specified, the default directory for "config" files is used.
bReadOnly  Whether the object should be read-only.

config::KSimpleConfig::~KSimpleConfig   [virtual]
 

Destructor.

Writes back any dirty configuration entries.


Member Function Documentation

void config::KSimpleConfig::sync   [virtual]
 

Flushes all changes that currently reside only in memory back to disk / permanent storage.

Dirty configuration entries are written to the most specific file available.

Asks the back end to flush out all pending writes, and then calls rollback(). No changes are made if the object has readOnly status.

You should call this from your destructor in derivative classes.

See also:
rollback(), isReadOnly()

Reimplemented from config::KConfigBase.


The documentation for this class was generated from the following files:
Generated on Sat Dec 14 20:05:54 2002 for libconfig by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002