/[ascend]/trunk/ascxx/compiler.h
ViewVC logotype

Annotation of /trunk/ascxx/compiler.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2327 - (hide annotations) (download) (as text)
Wed Dec 22 07:17:24 2010 UTC (13 years, 9 months ago) by jpye
File MIME type: text/x-chdr
File size: 1222 byte(s)
Merging in refactor of the C++ code, which is moved out of 'pygtk' and into 'ascxx'.
Adding support for IPOPT 3.9.1, the current latest version.
Support in dtar for parallel builds (possibly needs some testing still).
1 johnpye 773 #ifndef ASCXX_COMPILER_H
2     #define ASCXX_COMPILER_H
3    
4     /**
5     This class holds compiler configuration. At the moment there is only one
6     possible compiler, although one day there might be different compilers
7     for different model file types.
8    
9     During instantiation of a model (Type::getSimulation) we will need to
10     access the Compiler object (which is a singleton for the moment, although
11     it should not have to be) and query its values.
12    
13     The GUI must also access the Compiler object when it wants to set
14     configuration options.
15     */
16 johnpye 1046
17     #include <string>
18    
19 johnpye 773 class Compiler{
20     private:
21     Compiler();
22     ~Compiler();
23 johnpye 1046
24     /* options for bintoken compilation */
25     bool use_bintoken;
26     bool bintoken_options_sent;
27     std::string bt_targetstem;
28     std::string bt_srcname;
29     std::string bt_objname;
30     std::string bt_libname;
31     std::string bt_cmd;
32     std::string bt_rm;
33    
34     protected:
35     friend class Type;
36     void sendBinaryCompilationOptions(); /* pass them down to libascend */
37 johnpye 773 public:
38 johnpye 1046 static Compiler *instance(); /* (as in singleton pattern) */
39 johnpye 773
40     const bool getUseRelationSharing() const;
41     void setUseRelationSharing(const bool&);
42 johnpye 1046
43     void setBinaryCompilation(const bool&);
44 johnpye 773 };
45    
46     /** Compiler access function for use with Python */
47     Compiler *getCompiler();
48    
49     #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22