dune-fem 2.12-git
Loading...
Searching...
No Matches
parametertree.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_IO_PARAMETER_PARAMETERTREE_HH
2#define DUNE_FEM_IO_PARAMETER_PARAMETERTREE_HH
3
5
7
8namespace Dune
9{
10
11 namespace Fem
12 {
13
14 // parameterReader
15 // ---------------
16
17 inline static ParameterReader parameterReader ( const ParameterTree &parameterTree )
18 {
19 return ParameterReader( [ &parameterTree ] ( const std::string &key, const std::string *defaultValue ) {
20 return (parameterTree.hasKey( key ) ? &parameterTree[ key ] : defaultValue);
21 } );
22 }
23
24 } // namespace Fem
25
26} // namespace Dune
27
28#endif // #ifndef DUNE_FEM_IO_PARAMETER_PARAMETERTREE_HH
static ParameterReader parameterReader(const ParameterTree &parameterTree)
Definition parametertree.hh:17
BasicParameterReader< std::function< const std::string *(const std::string &, const std::string *) > > ParameterReader
Definition reader.hh:316
bool hasKey(const std::string &key) const