NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
configuration Class Reference

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
 

Detailed Description

Definition at line 33 of file configuration.h.

Constructor & Destructor Documentation

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:

This is an 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.


The documentation for this class was generated from the following files: