A parameter tree that logs which parameters have been used. More...
#include <dumux/common/loggingparametertree.hh>
A parameter tree that logs which parameters have been used.
Public Member Functions | |
LoggingParameterTree ()=delete | |
LoggingParameterTree (const Dune::ParameterTree ¶ms, const Dune::ParameterTree &defaultParams) | |
bool | hasKey (const std::string &key) const |
test for key More... | |
bool | hasKeyInGroup (const std::string &key, const std::string &groupPrefix) const |
test for key in group More... | |
void | report (std::ostream &stream=std::cout) const |
print the hierarchical parameter tree to stream More... | |
void | reportAll (std::ostream &stream=std::cout) const |
print distinct substructure to stream More... | |
std::string | findKeyInGroup (const Dune::ParameterTree &tree, const std::string &key, const std::string &groupPrefix) const |
Do a backwards hierarchical search for a key in a group. More... | |
std::string | get (const std::string &key, const std::string &defaultValue) const |
get value as string More... | |
std::string | getFromGroup (const std::string &groupPrefix, const std::string &key, const std::string &defaultValue) const |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched backwards for the parameter until its "first" occurrence. More... | |
std::string | get (const std::string &key, const char *defaultValue) const |
get value as string More... | |
std::string | getFromGroup (const std::string &groupPrefix, const std::string &key, const char *defaultValue) const |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence. More... | |
template<typename T > | |
T | get (const std::string &key, const T &defaultValue) const |
get value converted to a certain type More... | |
template<typename T > | |
T | getFromGroup (const std::string &groupPrefix, const std::string &key, const T &defaultValue) const |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence. More... | |
template<class T > | |
T | get (const std::string &key) const |
Get value. More... | |
template<typename T > | |
T | getFromGroup (const std::string &groupPrefix, const std::string &key) const |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence. More... | |
std::vector< std::string > | getUnusedKeys () const |
Find the keys that haven't been used yet. More... | |
|
delete |
|
inline |
|
inline |
Do a backwards hierarchical search for a key in a group.
tree | The tree to look in for keys |
key | The key |
groupPrefix | the group prefix attached to the key |
|
inline |
Get value.
T | Type of the value |
key | Key name |
RangeError | if key does not exist |
NotImplemented | Type is not supported |
|
inline |
get value as string
Returns pure string value for given key.
key | key name |
defaultValue | default if key does not exist |
|
inline |
get value as string
Returns pure string value for given key.
key | key name |
defaultValue | default if key does not exist |
|
inline |
get value converted to a certain type
Returns value as type T for given key.
T | type of returned value. |
key | key name |
defaultValue | default if key does not exist |
|
inline |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence.
Returns pure string value for given key.
groupPrefix | The prefix of the sub tree the search should start in |
key | key name |
|
inline |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence.
Returns pure string value for given key.
groupPrefix | The prefix of the sub tree the search should start in |
key | key name |
defaultValue | default if key does not exist |
|
inline |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched backwards for the parameter until its "first" occurrence.
Returns pure string value for given key.
groupPrefix | The prefix of the sub tree the search should start in |
key | key name |
defaultValue | default if key does not exist |
|
inline |
get value as string, preferably from the sub-tree corresponding to a given prefix. The sub-tree is searched for the parameter recursively until its "first" occurrence.
Returns pure string value for given key.
groupPrefix | The prefix of the sub tree the search should start in |
key | key name |
defaultValue | default if key does not exist |
|
inline |
Find the keys that haven't been used yet.
|
inline |
test for key
Tests whether given key exists.
key | key name |
|
inline |
test for key in group
Tests whether given key exists in a group. Given a group this function starts to look from the back for dots. In G1.G2.G3 the function first looks if the key "G3.Key" exists, then "G2.Key", ...
key | key name |
groupPrefix | the group prefix name |
|
inline |
print the hierarchical parameter tree to stream
stream | the output stream to print to |
|
inline |
print distinct substructure to stream
Prints all entries with given prefix.
stream | Stream to print to |