dune-fem
2.4.1-rc
|
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/io/parameter/container.hh>
Classes | |
struct | DGFBlock |
Public Member Functions | |
operator ParameterReader () const | |
cast into ParameterReader More... | |
int | setVerboseRank (int verboseRank) |
set the rank for verbose output 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) |
add a single 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 |
Protected Attributes | |
ParameterContainerData | parameter_ |
|
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) |
Referenced by Dune::Fem::Parameter::append().
|
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 |
|
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 |
References Dune::Fem::ParameterContainer::DGFBlock::advance(), Dune::Fem::ParameterContainer::DGFBlock::getLine(), and Dune::Fem::ParameterContainerData::verbose().
Referenced by Dune::Fem::Parameter::appendDGF().
|
inline |
clear all parameters
Referenced by Dune::Fem::PersistenceManager::restoreValue().
|
inline |
Referenced by Dune::Fem::Parameter::commonInputPath().
|
inline |
Referenced by Dune::Fem::Parameter::commonOutputPath().
|
inlineinherited |
check, whether a parameter is defined
[in] | key | name of the parameter to check |
|
inlineinherited |
get mandatory parameter
[in] | key | name of the parameter to get |
[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 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 |
|
inlineinherited |
|
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 |
[out] | value | value of the parameter |
|
inlineinherited |
get optional parameter
[in] | key | name of the parameter to get |
[in] | validator | validator for the parameter value |
|
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 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
References Dune::Fem::ParameterContainerData::verboseRank.
|
inline |
set the rank for verbose output
This mehtod allows to set the fem verbosity within the code.
[in] | verboseRank | the rank of the processor to have * verbose output (-1: no verbose output) |
[out] | the | value used before the change |
References Dune::Fem::ParameterContainerData::Value::value, Dune::Fem::ParameterContainerData::verbose(), and Dune::Fem::ParameterContainerData::verboseRank.
Referenced by Dune::Fem::Parameter::setVerboseRank().
|
inline |
obtain the cached value for fem.verbose
Referenced by Dune::Fem::Parameter::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 |
References Dune::Fem::ParameterContainerData::Value::defaultValue, Dune::Fem::ParameterContainerData::Value::fileName, Dune::Fem::ParameterContainerData::Value::hasDefault, Dune::Fem::ParameterContainerData::Value::used, and Dune::Fem::ParameterContainerData::Value::value.
Referenced by Dune::Fem::Parameter::write().
|
protectedinherited |