dune-common  2.3.1-rc1
parametertreeparser.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_PARAMETER_PARSER_HH
4 #define DUNE_PARAMETER_PARSER_HH
5 
10 #include <istream>
11 #include <string>
12 
14 
15 namespace Dune {
16 
22  {
23 
24  static std::string ltrim(const std::string& s);
25  static std::string rtrim(const std::string& s);
26 
27  public:
28 
72 
87  static void readINITree(std::istream& in, ParameterTree& pt,
88  bool overwrite);
89 
90 
103  static void readINITree(std::istream& in, ParameterTree& pt,
104  const std::string srcname = "stream",
105  bool overwrite = true);
106 
107 
118  static void readINITree(std::string file, ParameterTree& pt, bool overwrite = true);
119 
121 
133  static void readOptions(int argc, char* argv [], ParameterTree& pt);
134 
135  };
136 
137 } // end namespace Dune
138 
139 #endif // DUNE_PARAMETER_PARSER_HH
static void readOptions(int argc, char *argv[], ParameterTree &pt)
parse command line options and build hierarchical ParameterTree structure
Definition: parametertreeparser.cc:136
static void readINITree(std::istream &in, ParameterTree &pt, bool overwrite)
parse C++ stream
Definition: parametertreeparser.cc:53
Parsers to set up a ParameterTree from various input sources.
Definition: parametertreeparser.hh:21
A hierarchical structure of string parameters.
Hierarchical structure of string parameters.
Definition: parametertree.hh:33