/[escript]/trunk/escript/src/EscriptParams.h
ViewVC logotype

Contents of /trunk/escript/src/EscriptParams.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2142 - (show annotations)
Tue Dec 9 06:22:57 2008 UTC (13 years, 6 months ago) by jfenwick
File MIME type: text/plain
File size: 1471 byte(s)
Added showEscriptParams to output a list of available params.

1
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 #include <boost/python/list.hpp>
18
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 /**
43 \brief Set the value of a named parameter.
44 See listEscriptParams() (showEscriptParams() in python) for available parameters.
45 */
46 ESCRIPT_DLL_API
47 void setEscriptParamInt(const char* name, int value);
48
49 /**
50 \brief get the value of a named parameter.
51 See listEscriptParams() (showEscriptParams() in python) for available parameters.
52 */
53 ESCRIPT_DLL_API
54 int getEscriptParamInt(const char* name, int sentinel=0);
55
56 /**
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 }
64 #endif

  ViewVC Help
Powered by ViewVC 1.1.26