#include <configreader.h>
Public Types | |
|
typedef std::map< std::string, std::string > | StringMap |
Public Member Functions | |
| ConfigReader (std::istream &is) throw (std::exception) | |
| const StringMap & | get (const std::string &prefix, bool dontthrow=false) const throw (std::exception) |
| const std::string & | getVal (const std::string &prefix, const std::string &key) const throw (std::exception) |
| const std::string | getValOrDef (const std::string &prefix, const std::string &key, const std::string &def) const throw (std::exception) |
The configuration file has this syntax:
prefix_key=value
prefix is used to group values and keys, it can be empty. For example:
dbtype=mysql db_host=localhost db_username=greylist
Currently the following prefixes and keys are recognised:
db_host=[localhost] db_username=[greylist] db_password=[secret] db_dbname=[greylist]
Definition at line 74 of file configreader.h.
1.5.1