![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Draft for a configuration system (2008). More...
Go to the source code of this file.
Draft for a configuration system (2008).
configitems form a 3 level hierarchy:
** 1. file: ** contain sections ** ** 2. section: ** [prefix suffix] ** contain lines ** ** 3. lines are ** comment: ** empty line or line only containing spaces and tabs ** line starting with spaces and tabs followed by a # ** directive: ** '@include name' or '@readonly' ** directives are only valid at the toplevel section [] ** configurationentry: ** 'key = value' or 'key < redirect' ** erroneous: ** any line which can't be parsed **
Definition in file configitem.h.
Typedefs | |
| typedef lumiera_configitem * | LumieraConfigitem |
Classes | |
| struct | lumiera_configitem_vtable |
| struct | lumiera_configitem |
Functions | |
| LumieraConfigitem | lumiera_configitem_init (LumieraConfigitem self) |
| LumieraConfigitem | lumiera_configitem_destroy (LumieraConfigitem self, LumieraConfigLookup lookup) |
| LumieraConfigitem | lumiera_configitem_new (const char *line) |
| void | lumiera_configitem_delete (LumieraConfigitem self, LumieraConfigLookup lookup) |
| LumieraConfigitem | lumiera_configitem_set_value (LumieraConfigitem self, const char *delim_value) |
| LumieraConfigitem | lumiera_configitem_parse (LumieraConfigitem self, const char *line) |
| LumieraConfigitem | lumiera_configitem_move (LumieraConfigitem self, LumieraConfigitem dest) |
| typedef lumiera_configitem* LumieraConfigitem |
Definition at line 53 of file configitem.h.
| struct lumiera_configitem_struct |
| Class Members | ||
|---|---|---|
| llist | link | |
| LumieraConfigitem | parent | |
| llist | children | |
| llist | lookup | |
| char * | line | |
| char * | key | |
| size_t | key_size | |
| char * | delim | |
| struct lumiera_configitem_vtable * | vtable | |
Collaboration diagram for lumiera_configitem:| LumieraConfigitem lumiera_configitem_init | ( | LumieraConfigitem | self | ) |
Definition at line 47 of file configitem.c.
References NULL.
Referenced by lumiera_config_init(), and lumiera_configitem_new().
Here is the caller graph for this function:| LumieraConfigitem lumiera_configitem_destroy | ( | LumieraConfigitem | self, |
| LumieraConfigLookup | lookup | ||
| ) |
Definition at line 70 of file configitem.c.
References LLIST_WHILE_HEAD, lumiera_config_lookup_remove(), lumiera_configitem_delete(), and lumiera_free().
Referenced by lumiera_config_destroy(), and lumiera_configitem_delete().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_configitem_new | ( | const char * | line | ) |
Definition at line 96 of file configitem.c.
References lumiera_configitem_init(), lumiera_configitem_move(), lumiera_configitem_parse(), and lumiera_malloc().
Referenced by lumiera_config_set(), lumiera_config_setdefault(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| void lumiera_configitem_delete | ( | LumieraConfigitem | self, |
| LumieraConfigLookup | lookup | ||
| ) |
Definition at line 114 of file configitem.c.
References lumiera_configitem_destroy(), and lumiera_free().
Referenced by lumiera_configitem_destroy(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_configitem_set_value | ( | LumieraConfigitem | self, |
| const char * | delim_value | ||
| ) |
Definition at line 122 of file configitem.c.
References lumiera_configitem_parse(), and lumiera_tmpbuf_snprintf().
Referenced by lumiera_config_set().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_configitem_parse | ( | LumieraConfigitem | self, |
| const char * | line | ||
| ) |
Definition at line 165 of file configitem.c.
References lumiera_free(), lumiera_strndup(), parse_configentry(), parse_directive(), and parse_section().
Referenced by lumiera_configitem_new(), and lumiera_configitem_set_value().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_configitem_move | ( | LumieraConfigitem | self, |
| LumieraConfigitem | dest | ||
| ) |
Definition at line 135 of file configitem.c.
References NULL.
Referenced by lumiera_configentry_new(), and lumiera_configitem_new().
Here is the caller graph for this function: