Console node tree based config file parser. More...
#include <senf/Utils/Console/ConfigFile.hh>

Public Member Functions | |
| void | ignoreMissing () |
| Call to ignore missing files. More... | |
Public Member Functions inherited from senf::console::detail::BundleMixin | |
| BundleMixin () | |
| BundleMixin (DirectoryNode &root) | |
| void | parse () |
| Parse config file. More... | |
| void | parse (DirectoryNode &restrict) |
| Parse config file under restrict. More... | |
| bool | complete () const |
true, if all nodes have been parsed More... | |
| bool | parsed (GenericNode &node) const |
true. if node has been parsed More... | |
| void | reset () |
| Reset node parse info state. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| void | parseFile (std::string const &filename, DirectoryNode &root=senf::console::root()) |
| Read configuration file. More... | |
| detail::ConfigFileSource::ptr | FileConfig (std::string const &filename) |
| ConfigBundle source reading a configuration file. More... | |
Structors and default members | |
| ConfigFile (std::string const &filename, DirectoryNode &root=senf::console::root()) | |
| Create ConfigFile object for filename. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from senf::console::detail::BundleMixin | |
| template<class Source > | |
| Source & | add (boost::intrusive_ptr< Source > source) |
Console node tree based config file parser.
A ConfigFile instance allows flexible parsing of a config file against the console node tree. If you just want to parse a file completely, the senf::console::readConfig() function will do that. ConfigFile however allows to incrementally parse only a subdirectory of the complete configuration file.
If your application uses multiple configuration sources, use a ConfigBundle and FileConfig
Definition at line 51 of file ConfigFile.hh.
|
explicit |
Create ConfigFile object for filename.
The filename configuration file will be parsed using parse() calls. All configuration statements will be interpreted relative to root as root node.
| void senf::console::ConfigFile::ignoreMissing | ( | ) |
Call to ignore missing files.
|
related |
ConfigBundle source reading a configuration file.
This constructor is used to create a config source parsing the given configuration file to add to a ConfigBundle.
|
related |
Read configuration file.
The configuration file filename will be loaded, interpreting all node's relative to root as root node.
This function uses a local ConfigFile object to perform the parsing.