20#ifndef OPM_PROPERTYTREE_HEADER_INCLUDED
21#define OPM_PROPERTYTREE_HEADER_INCLUDED
30namespace boost::property_tree {
80 void put(
const std::string& key,
const T& data);
92 T
get(
const std::string& key)
const;
108 T
get(
const std::string& key,
const T&
defValue)
const;
129 std::optional<PropertyTree>
145 template <
typename T>
146 std::optional<std::vector<T>>
168 std::unique_ptr<boost::property_tree::ptree>
tree_;
Hierarchical collection of key/value pairs.
Definition PropertyTree.hpp:39
PropertyTree & operator=(const PropertyTree &tree)
Assignment operator.
Definition PropertyTree.cpp:118
~PropertyTree()
Destructor.
PropertyTree()
Default constructor.
Definition PropertyTree.cpp:35
std::unique_ptr< boost::property_tree::ptree > tree_
Internal representation of the property tree.
Definition PropertyTree.hpp:168
void write_json(std::ostream &os, bool pretty) const
Emit a textual representation of the property tree in JSON form.
Definition PropertyTree.cpp:76
std::optional< PropertyTree > get_child_optional(const std::string &key) const
Retrieve copy of sub tree rooted at node.
Definition PropertyTree.cpp:90
PropertyTree get_child(const std::string &key) const
Retrieve copy of sub tree rooted at node.
Definition PropertyTree.cpp:82
T get(const std::string &key) const
Retrieve property value given hierarchical property key.
Definition PropertyTree.cpp:59
std::optional< std::vector< T > > get_child_items_as_vector(const std::string &child) const
Retrieve node items as linearised vector.
Definition PropertyTree.cpp:101
void put(const std::string &key, const T &data)
Insert key/value pair into property tree.
Definition PropertyTree.cpp:71
Definition PropertyTree.hpp:31
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242