Source: gdms/cepConfiguration.h
|
|
|
|
/***************************************************************************
cepconfiguration2.h - description
-------------------
begin : Sun Aug 4 2002
copyright : (C) 2002 by Blake Swadling
email : blake@swadling.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/******************************************************************************
DOCBOOK START
FUNCTION cepConfiguration
PURPOSE store user definable configuration information
SYNOPSIS START
cepConfiguration::cepConfiguration(string& persistFile);
SYNOPSIS END
DESCRIPTION START
This class stores user definable configuration information such as the size
of the main window on startup. It is implemented using trivsql,a trivial SQL implementation from Michael Still (mikal@stillhq.com).
static intialise (const string& filename);
Initilises the configuration at a specific location
filename defines the location of the configuration database. One will be created if there is no database at this location already.
static cepConfiguration& getInstance();
Get a reference to the current configuration.
cepError getValue(const string& valkey, const string& defval, string& outval);
Get a string value from the configuration database. valkey defines the unique keyname for this value, and defval defines the default value to be used if a value isn't found in the database. If the database lacks a value for this key, then the default value is also written into the database for next time.
cepError getValue(const string& valkey, const bool& defval, bool& outval);
The same as the string version of getValue, but with a bool value.
cepError getValue(const string& valkey, const int& defval, int& outval);
The same as the string version of getValue, but with an int value.
cepError setValue(const string& valkey, const string& value);
Set a string value in the configuration database with key valkey to the value value.
cepError setValue(const string& valkey, const int& value);
The same as the string version of setValue, but for an int.
cepError setValue(const string& valkey, const bool& value);
The same as the string version of setValue, but for a bool.
DESCRIPTION END
DOCBOOK END
******************************************************************************/
#ifndef CEP_CONFIGURATION_H
#define CEP_CONFIGURATION_H
#include
| Generated by: pob on trillian on Sat Aug 10 17:26:42 2002, using kdoc 2.0a53. |