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

anycfg.h File Reference

This header file allows access to the configuration functions for C programs. More...

Go to the source code of this file.

Defines

#define ANYCFG_H_FILE   1

Typedefs

typedef void* ANYCFG_H
 This is actually an AcConfiguration pointer. More...


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 *value)
 Get a string value from the configuration. More...

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


Detailed Description

This header file allows access to the configuration functions for C programs.

It also makes it possible do simple manipulation of configurations without including all of the configuration library header files.


Typedef Documentation

typedef void * ANYCFG_H
 

This is actually an AcConfiguration pointer.


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.


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