Configuration registry


Modules

 Configuration section

Typedefs

typedef struct bg_cfg_registry_s bg_cfg_registry_t
 Configuration registry.

Functions

bg_cfg_registry_tbg_cfg_registry_create ()
 Create an empty configuration registry.
void bg_cfg_registry_destroy (bg_cfg_registry_t *reg)
 Destroy configuration registry and free all associated memory.
void bg_cfg_registry_load (bg_cfg_registry_t *reg, const char *filename)
 Load a configuration registry from an xml- file.
void bg_cfg_registry_save (bg_cfg_registry_t *reg, const char *filename)
 Save a configuration registry to an xml-file.
bg_cfg_section_tbg_cfg_registry_find_section (bg_cfg_registry_t *reg, const char *path)
 Find a section in the registry.

Detailed Description

This is a registry for configuration data, which stores the configuration of a whole application. Each module has it's own section, sections can have subsections. Inside the section, the configuration is stored as name-value pairs.

You can save a registry in an xml-file and load it again. Furthermore, sections can be attached to GUI-widgets. Special routines are available to copy all values from/to a section by using functions of type bg_set_parameter_func_t and bg_get_parameter_func_t.


Typedef Documentation

typedef struct bg_cfg_registry_s bg_cfg_registry_t

Configuration registry.

Opaque container for configuration sections.


Function Documentation

bg_cfg_registry_t* bg_cfg_registry_create (  ) 

Create an empty configuration registry.

Returns:
A newly allocated and empty registry.
To free the registry, use bg_cfg_registry_destroy.

void bg_cfg_registry_destroy ( bg_cfg_registry_t reg  ) 

Destroy configuration registry and free all associated memory.

Parameters:
reg A configuration registry.

void bg_cfg_registry_load ( bg_cfg_registry_t reg,
const char *  filename 
)

Load a configuration registry from an xml- file.

Parameters:
reg A configuration registry.
filename Name of the file

void bg_cfg_registry_save ( bg_cfg_registry_t reg,
const char *  filename 
)

Save a configuration registry to an xml-file.

Parameters:
reg A configuration registry.
filename Name of the file

bg_cfg_section_t* bg_cfg_registry_find_section ( bg_cfg_registry_t reg,
const char *  path 
)

Find a section in the registry.

Parameters:
reg A configuration registry
path The path
Returns:
Configuration section
Path looks like "section:subsection:subsubsection". If the section does not exist, an empty section is created (including enevtually missing parent sections).


Generated on Mon Jun 15 12:25:51 2009 for gmerlin by  doxygen 1.5.9