keydata Class Reference
Data keys parsed from a keyfile.
More...
#include <keydata.h>
Data Structures |
class | keyvalue |
| A key value set is used for iterative access. More...
|
Public Types |
typedef linked_pointer< keyvalue > | iterator |
| Convenience typedef for iterative pointer.
|
Public Member Functions |
const char * | get (const char *id) |
| Lookup a key value by it's id.
|
const char * | operator() (const char *id) |
| Lookup a key value by it's id.
|
void | set (const char *id, const char *value) |
| Set a keyword and value in the keydata structure.
|
void | clear (const char *id) |
| Remove a keyword id from the keydata structure.
|
const char * | get (void) |
| Get the name of this section.
|
keyvalue * | begin (void) |
| Get first value object, for iterative examinations.
|
keyvalue * | end (void) |
| Get last value object, for iterative examinations.
|
Friends |
class | keyfile |
class | keyvalue |
Detailed Description
Data keys parsed from a keyfile.
This is a specific [] section from a fully loaded keyfile, and offers common means to access data members. This is related to the original GNU Common C++ keydata object, although it is formed in a keyfile class which is loaded from a config file all at once.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 48 of file keydata.h.
Member Function Documentation
keyvalue* keydata::begin |
( |
void |
|
) |
[inline] |
Get first value object, for iterative examinations.
- Returns:
- first key value in chain.
Definition at line 119 of file keydata.h.
void keydata::clear |
( |
const char * |
id |
) |
|
Remove a keyword id from the keydata structure.
Removed items still use pager allocated memory.
- Parameters:
-
keyvalue* keydata::end |
( |
void |
|
) |
[inline] |
Get last value object, for iterative examinations.
- Returns:
- first key value in chain.
Definition at line 126 of file keydata.h.
const char* keydata::get |
( |
void |
|
) |
[inline] |
Get the name of this section.
Useful in iterative examinations.
- Returns:
- name of keydata section.
Definition at line 112 of file keydata.h.
const char* keydata::get |
( |
const char * |
id |
) |
|
Lookup a key value by it's id.
- Parameters:
-
- Returns:
- value string or NULL if not found.
const char* keydata::operator() |
( |
const char * |
id |
) |
[inline] |
Lookup a key value by it's id.
- Parameters:
-
- Returns:
- value string or NULL if not found.
Definition at line 89 of file keydata.h.
void keydata::set |
( |
const char * |
id, |
|
|
const char * |
value | |
|
) |
| | |
Set a keyword and value in the keydata structure.
If the keyword already exists, it is replaced. Removed items still use pager allocated memory.
- Parameters:
-
| id | to set. |
| value | for the id. |
The documentation for this class was generated from the following file: