Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

AnyConfig.cpp File Reference

More...

#include "AnyConfig.h"
#include "anycfg.h"

Namespaces

namespace  AnyConfig

Functions

void acfInit ()
 Must be called before any acfXXX function is used. More...

void acfTerm ()
 May only be called after all ANYCFG_H handles have been closed. More...

ANYCFG_H acfOpen (int argn, char *argv[])
 Open whatever configuration we can find. More...

long acfGetLong (ANYCFG_H cfgHdl, char *key)
 Get an integer value from the configuration. More...

int acfGetBool (ANYCFG_H cfgHdl, char *key)
 Get an boolean (yes/no) value from the configuration. More...

double acfGetNumber (ANYCFG_H cfgHdl, char *key)
 Get an floating point value from the configuration. More...

int acfGetStr (ANYCFG_H cfgHdl, char *key, char *val)
 Get a string value from the configuration. More...

void acfClose (ANYCFG_H cfgHdl)
 Close a configuration. More...


Variables

bool acfInited = false
 check that acfInit was called. More...


Detailed Description


Function Documentation

void acfClose ( ANYCFG_H cfgHdl )
 

Close a configuration.

Parameters:
cfgHdl   The handle from one of the open functions.

int acfGetBool ( ANYCFG_H cfgHdl,
char * key )
 

Get an boolean (yes/no) value from the configuration.

Parameters:
cfgHdl   The handle from one of the open functions.
key   The key to fetch.
Returns:
The value found.

long acfGetLong ( ANYCFG_H cfgHdl,
char * key )
 

Get an integer value from the configuration.

Parameters:
cfgHdl   The handle from one of the open functions.
key   The key to fetch.
Returns:
The value found.

double acfGetNumber ( ANYCFG_H cfgHdl,
char * key )
 

Get an floating point value from the configuration.

Parameters:
cfgHdl   The handle from one of the open functions.
key   The key to fetch.
Returns:
The value found.

int acfGetStr ( ANYCFG_H cfgHdl,
char * key,
char * value )
 

Get a string value from the configuration.

Parameters:
cfgHdl   The handle from one of the open functions.
key   The key to fetch.
value   The value found will be copied to this string buffer. The string buffer must be able to hold at least 256 bytes (255 character string plus a zero terminator).
Returns:
Non-zero if the key exists in the configuration.

void acfInit ( )
 

Must be called before any acfXXX function is used.

ANYCFG_H acfOpen ( int argn,
char * argv[] )
 

Open whatever configuration we can find.

Returns:
A handle to the configuration or NULL.

void acfTerm ( )
 

May only be called after all ANYCFG_H handles have been closed.


Variable Documentation

bool acfInited = false [static]
 

check that acfInit was called.


Generated at Wed Nov 21 11:34:17 2001 for AnyConfig by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001