HermesCommon  2.0
api.h
Go to the documentation of this file.
1 // This file is part of Hermes2D
2 //
3 // Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
4 // Email: hpfem-group@unr.edu, home page: http://hpfem.org/.
5 //
6 // Hermes2D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published
8 // by the Free Software Foundation; either version 2 of the License,
9 // or (at your option) any later version.
10 //
11 // Hermes2D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with Hermes2D; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef __HERMES_API_H_
23 #define __HERMES_API_H_
24 
25 #include "compat.h"
26 #include <map>
27 
28 namespace Hermes
29 {
32  {
33  exceptionsPrintCallstack,
34  matrixSolverType
35  };
36 
38  class HERMES_API Api
39  {
40  public:
41  Api();
42  ~Api();
43  protected:
46  class HERMES_API Parameter
47  {
48  public:
51  Parameter(int default_val);
52  bool user_set;
53  int user_val;
54  int default_val;
55  };
59  std::map<HermesCommonApiParam, Parameter*> parameters;
60 
61  public:
62  int get_integral_param_value(HermesCommonApiParam);
63  void set_integral_param_value(HermesCommonApiParam, int value);
64  };
65 
67  extern HERMES_API Hermes::Api HermesCommonApi;
68 }
69 #endif