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.
Configuration registry.
Opaque container for configuration sections.
Create an empty configuration registry.
- Returns
- A newly allocated and empty registry.
To free the registry, use bg_cfg_registry_destroy.
Destroy configuration registry and free all associated memory.
- Parameters
-
reg | A configuration registry. |
Load a configuration registry from an xml- file.
- Parameters
-
reg | A configuration registry. |
filename | Name of the file |
Save a configuration registry to an xml-file.
- Parameters
-
reg | A configuration registry. |
filename | Name of the file |
Check if a registry has a section.
- Parameters
-
reg | A configuration registry. |
name | Name of the section |
- Returns
- 1 if the section is present, 0 else
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).