NTRT Simulator
Version: Master
|
Public Member Functions | |
configuration () | |
bool | iskey (const std::string &s) const |
int | getintvalue (const std::string &key) |
double | getDoubleValue (const std::string &key) |
std::string | getStringValue (const std::string &key) |
void | readFile (const std::string filename) |
void | writeToFile (const std::string filename) |
Public Attributes | |
std::map< std::string, std::string > | data |
Definition at line 33 of file configuration.h.
configuration::configuration | ( | ) |
The configuration::data is a simple map string (key, value) pairs. The file is stored as a simple listing of those pairs, one per line. The key is separated from the value by an equal sign '='. Commentary begins with the first non-space character on the line a hash or semi-colon ('#' or ';').
Example:
source.directory = C: and Settings Documents\ file.types = *.jpg;*.gif;*.png;*.pix;*.tif;*.bmp
Notice that the configuration file format does not permit values to span more than one line, commentary at the end of a line, or [section]s.
Definition at line 35 of file configuration.cpp.