1 |
|
2 |
|
3 |
/******************************************************* |
4 |
* |
5 |
* Copyright (c) 2003-2008 by University of Queensland |
6 |
* Earth Systems Science Computational Center (ESSCC) |
7 |
* http://www.uq.edu.au/esscc |
8 |
* |
9 |
* Primary Business: Queensland, Australia |
10 |
* Licensed under the Open Software License version 3.0 |
11 |
* http://www.opensource.org/licenses/osl-3.0.php |
12 |
* |
13 |
*******************************************************/ |
14 |
|
15 |
#include <cstring> |
16 |
#include "EscriptParams.h" |
17 |
|
18 |
namespace escript |
19 |
{ |
20 |
|
21 |
EscriptParams escriptParams; // externed in header file |
22 |
|
23 |
|
24 |
EscriptParams::EscriptParams() |
25 |
{ |
26 |
too_many_lines=80; |
27 |
} |
28 |
|
29 |
int |
30 |
EscriptParams::getInt(const char* name, int sentinel) const |
31 |
{ |
32 |
if (!strcmp(name,"TOO_MANY_LINES")) |
33 |
{ |
34 |
return too_many_lines; |
35 |
} |
36 |
return sentinel; |
37 |
} |
38 |
|
39 |
void |
40 |
EscriptParams::setInt(const char* name, int value) |
41 |
{ |
42 |
if (!strcmp(name,"TOO_MANY_LINES")) |
43 |
{ |
44 |
too_many_lines=value; |
45 |
} |
46 |
} |
47 |
|
48 |
void |
49 |
setEscriptParamInt(const char* name, int value) |
50 |
{ |
51 |
escriptParams.setInt(name,value); |
52 |
} |
53 |
|
54 |
|
55 |
int |
56 |
getEscriptParamInt(const char* name, int sentinel) |
57 |
{ |
58 |
return escriptParams.getInt(name, sentinel); |
59 |
} |
60 |
|
61 |
|
62 |
} // end namespace |