dune-common  2.2.0
parametertreeparser.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=8 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 
28  public:
29 
73 
88  static void readINITree(std::istream& in, ParameterTree& pt,
89  bool overwrite);
90 
91 
104  static void readINITree(std::istream& in, ParameterTree& pt,
105  const std::string srcname = "stream",
106  bool overwrite = true);
107 
108 
119  static void readINITree(std::string file, ParameterTree& pt, bool overwrite = true);
120 
122 
134  static void readOptions(int argc, char* argv [], ParameterTree& pt);
135 
136  };
137 
138 } // end namespace Dune
139 
140 #endif // DUNE_PARAMETER_PARSER_HH