lbm_reference
|
Parser for hierarchical configuration files. More...
#include <confparser/ConfParser.h>
Public Member Functions | |
ConfParser () | |
Constructor. More... | |
ConfBlock & | parse (std::string configFileName) throw ( BadSyntax ) |
Parse a given configuration file. More... | |
virtual | ~ConfParser () |
Destructor. More... | |
Protected Member Functions | |
int | parse_rec (ConfBlock *currBlock, int level, int nLine, std::ifstream &configFile, const std::string &configFileName) |
Recursively parse a specific block. More... | |
Protected Attributes | |
ConfBlock | outermost_ |
Root block of the parse tree that is built, will be returned by parse. More... | |
Parser for hierarchical configuration files.
Parses hierarchical configuration files of the following structure:
The parsing result is a tree structure of ConfBlock objects and the actual key-value pairs are stored in a std::map.
Definition at line 128 of file ConfParser.h.
|
inline |
|
inlinevirtual |
Parse a given configuration file.
[in] | configFileName | Path to the configuration file to parse |
BadSyntax |
Definition at line 19 of file ConfParser.cpp.
Referenced by main(), and particles::ParticleSystem::ParticleSystem().
|
protected |
Recursively parse a specific block.
[in] | currBlock | Pointer to current block |
[in] | level | Nesting depth of current block |
[in] | nLine | Current line in the configuration file |
[in] | configFile | Stream to write out to |
[in] | configFileName | Name of the configuration file parsed |
Definition at line 36 of file ConfParser.cpp.
References confparser::ConfBlock::addChild(), and confparser::ConfBlock::addParam().
|
protected |
Root block of the parse tree that is built, will be returned by parse.
Definition at line 181 of file ConfParser.h.