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 |