OGS
ConfigTreeUtil.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "ConfigTree.h"
14 
15 namespace BaseLib
16 {
22 class ConfigTreeTopLevel final
23 {
24 public:
32  explicit ConfigTreeTopLevel(std::string const& filepath,
33  bool const be_ruthless,
34  ConfigTree::PTree&& ptree);
35 
42  ConfigTree const& operator*() const;
43 
50  ConfigTree const* operator->() const;
51 
59  void checkAndInvalidate();
60 
61 private:
62  ConfigTree::PTree const
65 };
66 
95  std::string const& filepath,
96  bool const be_ruthless,
97  std::string const& toplevel_tag,
98  const std::vector<std::string>& patch_files = {});
99 
100 } // namespace BaseLib
ConfigTree ctree_
ConfigTree depending on ptree_.
ConfigTree const & operator*() const
ConfigTree::PTree const ptree_
boost::property_tree that underlies ctree_
ConfigTree const * operator->() const
ConfigTreeTopLevel(std::string const &filepath, bool const be_ruthless, ConfigTree::PTree &&ptree)
boost::property_tree::ptree PTree
The tree being wrapped by this class.
Definition: ConfigTree.h:241
ConfigTreeTopLevel makeConfigTree(const std::string &filepath, const bool be_ruthless, const std::string &toplevel_tag, const std::vector< std::string > &patch_files)