1 |
jfenwick |
1897 |
|
2 |
|
|
/******************************************************* |
3 |
|
|
* |
4 |
|
|
* Copyright (c) 2003-2008 by University of Queensland |
5 |
|
|
* Earth Systems Science Computational Center (ESSCC) |
6 |
|
|
* http://www.uq.edu.au/esscc |
7 |
|
|
* |
8 |
|
|
* Primary Business: Queensland, Australia |
9 |
|
|
* Licensed under the Open Software License version 3.0 |
10 |
|
|
* http://www.opensource.org/licenses/osl-3.0.php |
11 |
|
|
* |
12 |
|
|
*******************************************************/ |
13 |
|
|
|
14 |
|
|
#ifndef escript_EscriptParams_H |
15 |
|
|
#define escript_EscriptParams_H |
16 |
|
|
#include "system_dep.h" |
17 |
jfenwick |
2142 |
#include <boost/python/list.hpp> |
18 |
jfenwick |
1897 |
|
19 |
|
|
namespace escript |
20 |
|
|
{ |
21 |
|
|
|
22 |
|
|
class EscriptParams |
23 |
|
|
{ |
24 |
|
|
public: |
25 |
|
|
ESCRIPT_DLL_API |
26 |
|
|
EscriptParams(); |
27 |
|
|
|
28 |
|
|
ESCRIPT_DLL_API |
29 |
|
|
int getInt(const char* name, int sentinel=0) const; |
30 |
|
|
|
31 |
|
|
ESCRIPT_DLL_API |
32 |
|
|
void setInt(const char* name, int value); |
33 |
|
|
private: |
34 |
|
|
|
35 |
|
|
// If we get more params we can replace this with a map |
36 |
|
|
int too_many_lines; |
37 |
|
|
}; |
38 |
|
|
|
39 |
|
|
|
40 |
|
|
extern EscriptParams escriptParams; |
41 |
|
|
|
42 |
jfenwick |
2142 |
/** |
43 |
|
|
\brief Set the value of a named parameter. |
44 |
|
|
See listEscriptParams() (showEscriptParams() in python) for available parameters. |
45 |
|
|
*/ |
46 |
jfenwick |
1897 |
ESCRIPT_DLL_API |
47 |
|
|
void setEscriptParamInt(const char* name, int value); |
48 |
|
|
|
49 |
jfenwick |
2142 |
/** |
50 |
|
|
\brief get the value of a named parameter. |
51 |
|
|
See listEscriptParams() (showEscriptParams() in python) for available parameters. |
52 |
|
|
*/ |
53 |
jfenwick |
1897 |
ESCRIPT_DLL_API |
54 |
|
|
int getEscriptParamInt(const char* name, int sentinel=0); |
55 |
|
|
|
56 |
jfenwick |
2142 |
/** |
57 |
|
|
\brief describe available paramters. |
58 |
|
|
\return a list of tuples (parameter name, description) |
59 |
|
|
*/ |
60 |
|
|
ESCRIPT_DLL_API |
61 |
|
|
boost::python::list listEscriptParams(); |
62 |
|
|
|
63 |
jfenwick |
1897 |
} |
64 |
|
|
#endif |