Combine multiple configuration sources.
More...
#include <senf/Utils/Console/Config.hh>
Combine multiple configuration sources.
A ConfigBundle combines several sources and parses them together, in the order they were added. Parse restrictions are applied uniformly to all sources.
conf.
add( senf::console::FileConfig(
"/etc/some.conf") );
conf.
add( senf::console::FileConfig(
"local.conf") );
This bundle may also be passed to other code which may use restricted parsing to parse
partial information from all configuration sources.
Definition at line 52 of file Config.hh.
◆ ConfigBundle() [1/2]
senf::console::ConfigBundle::ConfigBundle |
( |
| ) |
|
◆ ConfigBundle() [2/2]
senf::console::ConfigBundle::ConfigBundle |
( |
DirectoryNode & |
root | ) |
|
◆ add()
template<class Source >
Source& senf::console::ConfigBundle::add |
( |
boost::intrusive_ptr< Source > |
source | ) |
|
Add configuration source.
◆ chroot()
◆ complete()
bool senf::console::ConfigBundle::complete |
( |
| ) |
const |
true
, if all nodes have been parsed
◆ parse() [1/2]
void senf::console::ConfigBundle::parse |
( |
| ) |
|
Parse config bundle.
All nodes already parsed are skipped
Definition at line 106 of file Config.cc.
◆ parse() [2/2]
void senf::console::ConfigBundle::parse |
( |
DirectoryNode & |
restrict | ) |
|
Parse config bundle under restrict.
Only nodes which are children of restrict are parsed.
Definition at line 112 of file Config.cc.
◆ parsed()
bool senf::console::ConfigBundle::parsed |
( |
GenericNode & |
node | ) |
const |
true
. if node has been parsed
◆ reset()
void senf::console::ConfigBundle::reset |
( |
| ) |
|
Reset node parse info state.
After a call to reset(), all information about already parsed nodes is cleared. Calling parse() will parse the complete config bundle again.
◆ root()
The documentation for this class was generated from the following files: