31#ifndef _UCOMMON_KEYDATA_H_
32#define _UCOMMON_KEYDATA_H_
34#ifndef _UCOMMON_CONFIG_H_
38#ifndef _UCOMMON_LINKED_H_
42#ifndef _UCOMMON_MEMORY_H_
67 keydata(keyfile *file);
68 keydata(keyfile *file,
const char *
id);
69 __DELETE_COPY(keydata);
82 keyvalue(keyfile *allocator, keydata *section,
const char *key,
const char *data);
83 __DELETE_COPY(keyvalue);
97 const char *
get(
const char *
id)
const;
115 void set(
const char *
id,
const char *value);
128 inline const char *
get(
void)
const {
163 friend class keydata;
169 keydata *create(
const char *section);
172 void load(HKEY root, keydata *section = NULL,
const char *path = NULL);
173 bool save(HKEY root, keydata *section = NULL,
const char *path = NULL);
188 keyfile(
const char *path,
size_t pagesize = 0);
217 void load(
const keydata *source);
229 keydata *
get(
const char *section)
const;
231 inline keydata *operator()(
const char *section)
const {
235 inline keydata *operator[](
const char *section)
const {
243 inline keydata *
get(
void)
const {
252 return (keydata *)index.
begin();
259 inline keydata *
end(
void)
const {
260 return (keydata *)index.
end();
268 inline int err(
void)
const {
Private heaps, pools, and associations.
Various miscellaneous platform specific headers and defines.
Linked objects, lists, templates, and containers.
Common namespace for all ucommon objects.
T copy(const T &src)
Convenience function to copy objects.
Data keys parsed from a keyfile.
keyvalue * end(void) const
Get last value object, for iterative examinations.
keyvalue * begin(void) const
Get first value object, for iterative examinations.
const char * get(const char *id) const
Lookup a key value by it's id.
void clear(const char *id)
Remove a keyword id from the keydata structure.
const char * operator()(const char *id) const
Lookup a key value by it's id.
linked_pointer< keyvalue > pointer
Convenience typedef for iterative pointer.
const char * get(void) const
Get the name of this section.
void set(const char *id, const char *value)
Set a keyword and value in the keydata structure.
A key value set is used for iterative access.
Traditional keypair config file parsing class.
keyfile(size_t pagesize=0)
Create an empty key file ready for loading.
void release(void)
Release and re-initialize keyfile.
bool save(const char *path)
Save (write) a set of config keys to dist.
keyfile(const char *path, size_t pagesize=0)
Create a key file object from an existing config file.
keydata * end(void) const
Get last keydata object, for iterative examinations.
void assign(keyfile &source)
Assign foreign pager to us.
void load(const keydata *source)
Load a single set of keys.
keydata * get(const char *section) const
Get a keydata section name.
linked_pointer< keydata > pointer
Convenience typedef for iterative pointer.
void load(const keyfile *source)
Load from an existing keyfile object.
keydata * get(void) const
Get the non-sectioned defaults if there are any.
keydata * begin(void) const
Get first keydata object, for iterative examinations.
void load(const char *path)
Load (overlay) another config file over the currently loaded one.
An index container for maintaining an ordered list of objects.
OrderedObject(OrderedIndex *index)
Construct an ordered object aot end of a an index.
A smart pointer template for iterating linked lists.
memalloc(size_t page=0)
Construct a memory pager.