![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
#include <configurationFileParser.hpp>
Public Member Functions | |
| ConfigurationFileParser (const std::string &filePath) | |
| virtual | ~ConfigurationFileParser () |
| void | getConfiguration (std::map< std::string, anch::resource::Section > &config) const throw (anch::resource::file::ResourceFileException) |
Configuration file parser
Classic configuration file paser
Sections are declared following pattern ^[[-a-zA-Z0-9_]+]
Options are declared following pattern ^[-a-zA-Z0-9_]+=.*
Comments are declared following pattern ([^]#).*
If empty section is found, every of its options will be store with no section.
Errors in configuration file will be ignored.
| ConfigurationFileParser::ConfigurationFileParser | ( | const std::string & | filePath | ) |
ConfigurationFileParser constructor
| filePath | The configuration file path |
|
virtual |
ConfigurationFileParser destructor
| void ConfigurationFileParser::getConfiguration | ( | std::map< std::string, anch::resource::Section > & | config | ) | const |
| throw | ( | anch::resource::file::ResourceFileException | |||
| ) | |||||
Get configuration from file
| config | The current configuration |
1.8.11