Reading configuration files
![]() | Retrieval operators Overload operators
|
![]() | GetStringItem ( StringC const & iClass, StringC const & iItem ) throw(ExceptionA*) This function retrieves an item given a class and a variable name. |
![]() | PrintToStream ( ostream & iStream ) Prints the loaded configuration to the stream. |
The configuration class reads a file containing items looking like this: 'NumberOfRuns = 10'. It also makes use of classes, these look like: '[Experiment]'. All items on lines below a line containing a class, and above a line containing some other class, belong to that first class. Using this items can be grouped together. For example:Means that 'NumberOfRuns' belongs to 'Experiment' and when we want to read this item in the program we just say:
- [Experiment]
- NumberOfRuns = 10
- unsigned int NumberOfRuns
- = Configuration("Experiment", "NumberOfRuns");
virtual StringC const operator)
( char const * iClass, char const * iItem )
virtual StringC const operator)
( char const * iClass, StringC const & iItem )
virtual StringC const operator)
( StringC const & iClass, char const * iItem )
virtual StringC const GetStringItem( StringC const & iClass, StringC const & iItem ) throw(ExceptionA*)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de