A parameter tree that logs which parameters have been used.
|
| 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...
|
|
std::vector< std::string > | getSubGroups (const std::string &subGroupName, std::string groupPrefix) const |
| obtain a vector of all full group names for a specified subgroup name 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...
|
|
std::vector< std::string > Dumux::LoggingParameterTree::getSubGroups |
( |
const std::string & |
subGroupName, |
|
|
std::string |
groupPrefix |
|
) |
| const |
|
inline |
obtain a vector of all full group names for a specified subgroup name
Example:
For the parameter tree
[G1] MyParam1 = 1 [G2.G1] MyParam2 = 2 [G3.G2.G1] MyParam3 = 3
and groupPrefix="G3.G2" and subGroupName="G1" this returns a vector with the entries {"G3.G2.G1", "G2.G1", "G1"}. If groupPrefix = "G2", it returns {"G2.G1", "G1"}. If groupPrefix = "" the returned vector has size 1 (containing subGroupName), or size 0 if the subgroup does not exist in the parameter tree.
- Parameters
-
subGroupName | the sub group to look for |
groupPrefix | the group prefix name (potentially prefixing the subgroup) |
- Returns
- a vector of fully qualified groups ordered by decreasing tree depth