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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1897 - (hide annotations)
Mon Oct 20 00:32:30 2008 UTC (14 years, 1 month ago) by jfenwick
File MIME type: text/plain
File size: 1005 byte(s)
Modified Data::toString() so it doesn't throw on DataEmpty.
Added setEscriptParamInt and getEscriptParamInt as free functions.
At the moment all they do is allow you to set the param TOO_MANY_LINES.
This is used to determine when printing a Data object will show you the 
points and when it will print a summary.

I've set the default value back to 80 lines.
If you need to see more lines use (in python):

setEscriptParamInt("TOO_MANY_LINES",80000)


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    
18     namespace escript
19     {
20    
21     class EscriptParams
22     {
23     public:
24     ESCRIPT_DLL_API
25     EscriptParams();
26    
27     ESCRIPT_DLL_API
28     int getInt(const char* name, int sentinel=0) const;
29    
30     ESCRIPT_DLL_API
31     void setInt(const char* name, int value);
32     private:
33    
34     // If we get more params we can replace this with a map
35     int too_many_lines;
36     };
37    
38    
39     extern EscriptParams escriptParams;
40    
41     ESCRIPT_DLL_API
42     void setEscriptParamInt(const char* name, int value);
43    
44     ESCRIPT_DLL_API
45     int getEscriptParamInt(const char* name, int sentinel=0);
46    
47     }
48     #endif

  ViewVC Help
Powered by ViewVC 1.1.26