Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
config-lookup.h
Go to the documentation of this file.
1/*
2 CONFIG-LOOKUP.h - Lookup functions for the config subsystem
3
4 Copyright (C)
5 2008, Christian Thaeter <ct@pipapo.org>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
28#ifndef COMMON_CONFIG_LOOKUP_H
29#define COMMON_CONFIG_LOOKUP_H
30
31#include "lib/psplay.h"
32#include "lib/llist.h"
33#include "lib/error.h"
34
35typedef struct lumiera_config_lookup_struct lumiera_config_lookup;
36typedef lumiera_config_lookup* LumieraConfigLookup;
37
38typedef struct lumiera_config_lookupentry_struct lumiera_config_lookupentry;
39typedef lumiera_config_lookupentry* LumieraConfigLookupentry;
40
41
42#include "common/configitem.h"
43
44#include <nobug.h>
45
46
47LUMIERA_ERROR_DECLARE (CONFIG_LOOKUP);
48
49
54{
55 psplay tree;
56};
57
65
73
83
84
95
96
108
117lumiera_config_lookup_find (LumieraConfigLookup self, const char* key);
118
127
136
137
138
139/* == lookup hash entries using the PSplay tree */
140
141
144{
145 psplaynode node;
146
149
156 char* full_key;
157};
158
159
160/* internal */
163
165lumiera_config_lookupentry_new (const char* key);
166
167/* internal */
170
171
172void
174
175
176#endif /*COMMON_CONFIG_LOOKUP_H*/
177/*
178// Local Variables:
179// mode: C
180// c-file-style: "gnu"
181// indent-tabs-mode: nil
182// End:
183*/
LumieraConfigitem lumiera_config_lookup_item_find(LumieraConfigLookup self, const char *key)
Find a the topmost config item stored to a given key.
LumieraConfigLookup lumiera_config_lookup_destroy(LumieraConfigLookup self)
Destroy a lookup structure.
LumieraConfigLookupentry lumiera_config_lookup_insert(LumieraConfigLookup self, LumieraConfigitem item)
Add a config item to a lookup structure.
LumieraConfigLookupentry lumiera_config_lookupentry_destroy(LumieraConfigLookupentry self)
LumieraConfigLookup lumiera_config_lookup_init(LumieraConfigLookup self)
Initialise a lookup structure.
LumieraConfigLookupentry lumiera_config_lookupentry_new(const char *key)
LumieraConfigLookupentry lumiera_config_lookup_find(LumieraConfigLookup self, const char *key)
Find a hashtable entry in the lookup structure.
LumieraConfigitem lumiera_config_lookup_remove(LumieraConfigLookup self, LumieraConfigitem item)
Remove a config item from a lookup structure.
void lumiera_config_lookupentry_delete(LumieraConfigLookupentry self)
lumiera_config_lookup * LumieraConfigLookup
llist configitems
stack of all configitems stored under this key
LumieraConfigLookupentry lumiera_config_lookupentry_init(LumieraConfigLookupentry self, const char *key)
lumiera_config_lookupentry * LumieraConfigLookupentry
char * full_key
we store a copy of the full key here configentry keys are complete as expected section keys are the p...
LumieraConfigLookupentry lumiera_config_lookup_insert_default(LumieraConfigLookup self, LumieraConfigitem item)
LumieraConfigitem lumiera_config_lookup_item_tail_find(LumieraConfigLookup self, const char *key)
Find a the bottom most config item stored to a given key.
Just contains a hashtable to give sufficient abstraction.
Draft for a configuration system (2008).
lumiera_configitem * LumieraConfigitem
Definition configitem.h:53
Lumiera error handling (C interface).
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Definition error.h:62
Intrusive cyclic double linked list There is only one node type which contains a forward and a backwa...
Probabilistic splay tree.