![]() |
OGS
|
Manages a ConfigTree and the boost::property_tree
it depends on.
The whole purpose of this class is making the management of said dependency easy.
Definition at line 22 of file ConfigTreeUtil.h.
#include <ConfigTreeUtil.h>
Public Member Functions | |
ConfigTreeTopLevel (std::string const &filepath, bool const be_ruthless, ConfigTree::PTree &&ptree) | |
ConfigTree const & | operator* () const |
ConfigTree const * | operator-> () const |
void | checkAndInvalidate () |
Private Attributes | |
ConfigTree::PTree const | ptree_ |
boost::property_tree that underlies ctree_ More... | |
ConfigTree | ctree_ |
ConfigTree depending on ptree_ . More... | |
|
explicit |
Construct a new instance from the given data.
filepath | stored for use in error/warning messages |
be_ruthless | if true, then warnings will raise errors, .i.e. lead to program abortion, else warnings will only warn |
ptree | the underlying ptree of the created ConfigTree |
Definition at line 28 of file ConfigTreeUtil.cpp.
void BaseLib::ConfigTreeTopLevel::checkAndInvalidate | ( | ) |
Check if the contained ConfigTree has been processed entirely.
This only checks the top level, as usual with ConfigTree instances.
Definition at line 47 of file ConfigTreeUtil.cpp.
References BaseLib::checkAndInvalidate(), and ctree_.
ConfigTree const & BaseLib::ConfigTreeTopLevel::operator* | ( | ) | const |
Access the contained ConfigTree.
The non-const version of this method has not been implemented in order to prevent invalidating the ctree_
when it is passed around. In order to check and invalidate ctree_
use the provided member function.
Definition at line 37 of file ConfigTreeUtil.cpp.
References ctree_.
ConfigTree const * BaseLib::ConfigTreeTopLevel::operator-> | ( | ) | const |
Access the contained ConfigTree.
The non-const version of this method has not been implemented in order to prevent invalidating the ctree_
when it is passed around. In order to check and invalidate ctree_
use the provided member function.
Definition at line 42 of file ConfigTreeUtil.cpp.
References ctree_.
|
private |
ConfigTree depending on ptree_
.
Definition at line 64 of file ConfigTreeUtil.h.
Referenced by checkAndInvalidate(), operator*(), and operator->().
|
private |
boost::property_tree
that underlies ctree_
Definition at line 63 of file ConfigTreeUtil.h.