#include <ConfigSection.h>
Inheritance diagram for ConfigSection:
The file is of the syntax:
# this is a whole line comment key = value an ugly key name = long value # this end is a comment too
also empty lines are ignored and all white space is removed from the front and end of keys / values
Knwon problem: you can't use '#' in any part of a key / value pair
Definition at line 70 of file ConfigSection.h.
Public Member Functions | |
ConfigSection (void) throw ( Exception ) | |
Default constructor. | |
virtual | ~ConfigSection (void) throw ( Exception ) |
Destructor. | |
virtual bool | add (const char *key, const char *value) throw ( Exception ) |
Add a key / value pair to the configuration information. | |
virtual const char * | get (const char *key) const throw ( Exception ) |
Get a value for a key. | |
virtual const char * | getForSure (const char *key, const char *message1=0, const char *message2=0, int code=0) const throw ( Exception ) |
Get a value for a key, or throw an Exception. | |
virtual bool | addLine (const char *line) throw ( Exception ) |
Add a line of configuration information. |
|
Default constructor.
Definition at line 96 of file ConfigSection.h. |
|
Destructor.
Definition at line 106 of file ConfigSection.h. |
|
Add a key / value pair to the configuration information.
Definition at line 70 of file ConfigSection.cpp. Referenced by addLine(). |
|
Add a line of configuration information.
Definition at line 128 of file ConfigSection.cpp. References add(), and WHITE_SPACE_STR. Referenced by Config::addLine(). |
|
Get a value for a key.
Definition at line 90 of file ConfigSection.cpp. |
|
Get a value for a key, or throw an Exception.
Definition at line 108 of file ConfigSection.cpp. |