#include <DarkIceConfig.h>
Inheritance diagram for Config:
The file is of the syntax:
[section1] # this is a whole line comment key = value an ugly key name = long value # this end is a comment too
[section2] # this is a whole line comment in section 2 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 79 of file DarkIceConfig.h.
Public Member Functions | |
Config (void) throw ( Exception ) | |
Default constructor. | |
Config (std::istream &is) throw ( Exception ) | |
Constructor based on an input stream. | |
virtual | ~Config (void) throw ( Exception ) |
Destructor. | |
virtual void | reset (void) throw ( Exception ) |
Delete the configuration information stored in the object. | |
virtual bool | addLine (const char *line) throw ( Exception ) |
Read a line of confiugration information. | |
virtual void | read (std::istream &is) throw ( Exception ) |
Read a line of confiugration information. | |
virtual const ConfigSection * | get (const char *key) const throw ( Exception ) |
Get a ConfigSection by name. |
|
Default constructor.
Definition at line 114 of file DarkIceConfig.h. |
|
Constructor based on an input stream.
Definition at line 126 of file DarkIceConfig.h. References read(). |
|
Destructor.
Definition at line 137 of file DarkIceConfig.h. |
|
Read a line of confiugration information.
Definition at line 94 of file DarkIceConfig.cpp. References ConfigSection::addLine(), and WHITE_SPACE_STR. Referenced by read(). |
|
Get a ConfigSection by name.
Definition at line 76 of file DarkIceConfig.cpp. |
|
Read a line of confiugration information.
Definition at line 149 of file DarkIceConfig.cpp. References addLine(), and LINE_SIZE. Referenced by Config(). |
|
Delete the configuration information stored in the object. Resets the object to a clean state.
Definition at line 163 of file DarkIceConfig.h. |