|
a/src/utils/conftree.h |
|
b/src/utils/conftree.h |
|
... |
|
... |
25 |
* Lines like '[subkeyname]' in the file define subsections, with independant
|
25 |
* Lines like '[subkeyname]' in the file define subsections, with independant
|
26 |
* configuration namespaces.
|
26 |
* configuration namespaces.
|
27 |
*
|
27 |
*
|
28 |
* Whitespace around name and value is insignificant.
|
28 |
* Whitespace around name and value is insignificant.
|
29 |
*
|
29 |
*
|
30 |
* Values can be queried for, or set. (the file is then rewritten).
|
|
|
31 |
* The names are case-sensitive but don't count on it either.
|
30 |
* The names are case-sensitive but don't count on it.
|
|
|
31 |
*
|
|
|
32 |
* Values can be queried for, or set.
|
32 |
* Any line without a '=' is discarded when rewriting the file.
|
33 |
* Any line without a '=' is discarded when rewriting the file.
|
33 |
* All 'set' calls currently cause an immediate file rewrite.
|
34 |
* A configuration object can be created empty or by reading from a file or
|
|
|
35 |
* a string.
|
|
|
36 |
* All 'set' calls cause an immediate rewrite of the backing object if any
|
|
|
37 |
* (file or string)
|
|
|
38 |
*
|
|
|
39 |
* Config objects can be stacked (overlayed).
|
34 |
*/
|
40 |
*/
|
35 |
|
41 |
|
36 |
#include <string>
|
42 |
#include <string>
|
37 |
#include <map>
|
43 |
#include <map>
|
38 |
#include <list>
|
44 |
#include <list>
|
|
... |
|
... |
70 |
* @param readonly if true open readonly, else rw
|
76 |
* @param readonly if true open readonly, else rw
|
71 |
* @param tildexp try tilde (home dir) expansion for subsection names
|
77 |
* @param tildexp try tilde (home dir) expansion for subsection names
|
72 |
*/
|
78 |
*/
|
73 |
ConfSimple(string *data, int readonly = 0, bool tildexp = false);
|
79 |
ConfSimple(string *data, int readonly = 0, bool tildexp = false);
|
74 |
|
80 |
|
|
|
81 |
/**
|
|
|
82 |
* Build an empty object. This will be memory only, with no backing store.
|
|
|
83 |
* @param readonly if true open read only, else rw
|
|
|
84 |
* @param tildexp try tilde (home dir) expansion for subsection names
|
|
|
85 |
*/
|
|
|
86 |
ConfSimple(int readonly = 0, bool tildexp = false);
|
|
|
87 |
|
75 |
virtual ~ConfSimple() {};
|
88 |
virtual ~ConfSimple() {};
|
76 |
|
89 |
|
77 |
/**
|
90 |
/**
|
78 |
* Get value for named parameter, from specified subsection (looks in
|
91 |
* Get value for named parameter, from specified subsection (looks in
|
79 |
* global space if sk is empty).
|
92 |
* global space if sk is empty).
|