|
dune-fem
2.8-git
|
#include <dune/fem/io/parameter/container.hh>

Classes | |
| struct | DGFBlock |
Public Types | |
| typedef BasicParameterReader< ParameterContainerData > | ThisType |
Public Member Functions | |
| operator ParameterReader () const | |
| cast into ParameterReader More... | |
| void | append (int &argc, char **argv) |
| add parameters from the command line More... | |
| void | append (const std::string &filename) |
| add parameters from a file More... | |
| void | append (const std::string &key, const std::string &value, bool force=false) |
| add a single parameter to the container More... | |
| template<class T > | |
| std::string | toString (const T &value) |
| A helper function to convert numbers to scientific strings. More... | |
| template<class NumberType , std::enable_if_t< std::is_floating_point< NumberType >::value||std::is_integral< NumberType >::value, int > = 0> | |
| void | append (const std::string &key, NumberType value, bool force=false) |
| add a single Floating number parameter to the container More... | |
| void | appendDGF (const std::string &filename) |
| add parameters from a DGF file More... | |
| void | clear () |
| clear all parameters More... | |
| bool | verbose () const |
| obtain the cached value for fem.verbose More... | |
| std::string | commonInputPath () const |
| std::string | commonOutputPath () const |
| void | write (std::ostream &out, bool writeAll=true) const |
| write the parameter database to a stream More... | |
| bool | exists (const std::string &key) const |
| check, whether a parameter is defined More... | |
| void | get (const std::string &key, T &value) const |
| get mandatory parameter More... | |
| void | get (const std::string &key, const T &defaultValue, T &value) const |
| get optional parameter More... | |
| void | get (const std::string &key, const char *defaultValue, std::string &value) const |
| get optional parameter (special case for string) More... | |
| void | getValid (const std::string &key, const Validator &validator, T &value) const |
| get mandatory parameter More... | |
| void | getValid (const std::string &key, const T &defaultValue, const Validator &validator, T &value) const |
| get optional parameter More... | |
| T | getValue (const std::string &key) const |
| get mandatory parameter More... | |
| T | getValue (const std::string &key, const T &defaultValue) const |
| get optional parameter More... | |
| T | getValidValue (const std::string &key, const Validator &validator) const |
| get optional parameter More... | |
| T | getValidValue (const std::string &key, const T &defaultValue, const Validator &validator) const |
| get optional parameter More... | |
| int | getEnum (const std::string &key, const std::string(&values)[n]) const |
| int | getEnum (const std::string &key, const std::string(&values)[n], int defaultValue) const |
| int | getEnum (const std::string &key, const std::vector< std::string > &values) const |
| int | getEnum (const std::string &key, const std::vector< std::string > &values, int defaultValue) const |
| ThisType * | clone () const |
| ParameterContainerData | parameter () |
| const ParameterContainerData | parameter () const |
| void | reset () |
Protected Attributes | |
| ParameterContainerData | parameter_ |
|
inherited |
|
inline |
add parameters from a file
| [in] | filename | name of the file containing the parameters |
|
inline |
add a single parameter to the container
| [in] | key | key of the parameter to add |
| [in] | value | value of the parameter to add |
| [in] | force | replace parameter, if it exists |
|
inline |
add a single Floating number parameter to the container
| [in] | key | key of the parameter to add |
| [in] | value | value of the parameter to add |
| [in] | force | replace parameter, if it exists |
|
inline |
add parameters from the command line
This mehtod adds all parameters (strings containing a colon) in the command line to the container. The parameters are then removed from the command line.
| [in] | argc | number of arguments (as given to main) |
| [in] | argv | vector of arguments (as given to main) |
|
inline |
add parameters from a DGF file
Parameters can also be read from a DGF file containing a 'FemParameter' block.
| [in] | filename | name of the DGF file containing the parameters |
|
inline |
clear all parameters
|
inlineinherited |
|
inline |
|
inline |
|
inlineinherited |
check, whether a parameter is defined
| [in] | key | name of the parameter to check |
|
inlineinherited |
get optional parameter (special case for string)
| [in] | key | name of the parameter to get |
| [in] | defaultValue | default value for this parameter |
| [out] | value | value of the parameter |
|
inlineinherited |
get optional parameter
| [in] | key | name of the parameter to get |
| [in] | defaultValue | default value for this parameter |
| [out] | value | value of the parameter |
|
inlineinherited |
get mandatory parameter
| [in] | key | name of the parameter to get |
| [out] | value | value of the parameter |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
get optional parameter
| [in] | key | name of the parameter to get |
| [in] | defaultValue | default value for this parameter |
| [in] | validator | validator for the parameter value |
| [out] | value | value of the parameter |
|
inlineinherited |
get mandatory parameter
| [in] | key | name of the parameter to get |
| [in] | validator | validator for the parameter value |
| [out] | value | value of the parameter |
|
inlineinherited |
get optional parameter
| [in] | key | name of the parameter to get |
| [in] | defaultValue | default value for this parameter |
| [in] | validator | validator for the parameter value |
|
inlineinherited |
get optional parameter
| [in] | key | name of the parameter to get |
| [in] | validator | validator for the parameter value |
|
inlineinherited |
get mandatory parameter
| [in] | key | name of the parameter to get |
|
inlineinherited |
get optional parameter
| [in] | key | name of the parameter to get |
| [in] | defaultValue | default value for this parameter |
|
inline |
cast into ParameterReader
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
A helper function to convert numbers to scientific strings.
| [in] | value | the value to be converted (needs a << operator) |
|
inline |
obtain the cached value for fem.verbose
|
inline |
write the parameter database to a stream
This method writes paramters to the given stream. If the second parameter is true all parameters are written; otherwise only used parameters which do not coincide with the default value are written.
| [in] | out | stream for the parameters. |
| [in] | writeAll | default is true |
|
protectedinherited |