ucc::keyfile Class Reference

Traditional keypair config file parsing class. More...

#include <keydata.h>

Inheritance diagram for ucc::keyfile:
Inheritance graph
[legend]
Collaboration diagram for ucc::keyfile:
Collaboration graph
[legend]

Public Types

typedef linked_pointer< keydataiterator
 Convenience typedef for iterative pointer.

Public Member Functions

keydatabegin (void)
 Get first keydata object, for iterative examinations.
keydataend (void)
 Get last keydata object, for iterative examinations.
keydataget (void)
 Get the non-sectioned defaults if there are any.
keydataget (char *section)
 Get a keydata section name.
 keyfile (char *path, size_t pagesize=0)
 Create a key file object from an existing config file.
 keyfile (size_t pagesize=0)
 Create an empty key file ready for loading.
void load (char *path)
 Load (overlay) another config file over the currently loaded one.
keydataoperator() (char *section)
keydataoperator[] (char *section)

Friends

class keydata

Detailed Description

Traditional keypair config file parsing class.

This is used to get generic config data either from a /etc/xxx.conf, a windows style xxx.ini file, or a ~/.xxxrc file, and parses [] sections from the entire file at once.

Definition at line 150 of file keydata.h.


Constructor & Destructor Documentation

ucc::keyfile::keyfile ( size_t  pagesize = 0  ) 

Create an empty key file ready for loading.

Parameters:
pagesize for memory paging.
ucc::keyfile::keyfile ( char *  path,
size_t  pagesize = 0 
)

Create a key file object from an existing config file.

Parameters:
path to load from.
pagesize for memory paging.

Member Function Documentation

keydata* ucc::keyfile::begin ( void   )  [inline]

Get first keydata object, for iterative examinations.

Returns:
first key value in chain.

Definition at line 205 of file keydata.h.

keydata* ucc::keyfile::end ( void   )  [inline]

Get last keydata object, for iterative examinations.

Returns:
first key value in chain.

Definition at line 212 of file keydata.h.

keydata* ucc::keyfile::get ( void   )  [inline]

Get the non-sectioned defaults if there are any.

Returns:
default key section.

Definition at line 198 of file keydata.h.

keydata* ucc::keyfile::get ( char *  section  ) 

Get a keydata section name.

Parameters:
section name to look for.
Returns:
keydata section object if found, NULL if not.
void ucc::keyfile::load ( char *  path  ) 

Load (overlay) another config file over the currently loaded one.

This is used to merge key data, such as getting default values from a global config, and then overlaying a local home config file.

Parameters:
path to load keys from into current object.

The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208