/[ascend]/trunk/pygtk/compiler.cpp
ViewVC logotype

Contents of /trunk/pygtk/compiler.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 773 - (show annotations) (download) (as text)
Fri Jul 14 06:07:14 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-c++src
File size: 686 byte(s)
Adding files for the 'Compiler' class.
1 #include "compiler.h"
2
3 #include <compiler/compiler.h>
4
5 #include <iostream>
6 using namespace std;
7
8 Compiler::Compiler(){
9 cerr << "CREATED COMPILER" << endl;
10 }
11
12 Compiler::~Compiler(){
13 cerr << "DESTROYED COMPILER" << endl;
14 }
15
16 Compiler *
17 Compiler::instance(){
18 static Compiler *_instance = NULL;
19 if(_instance == NULL){
20 _instance = new Compiler();
21 }
22 return _instance;
23 }
24
25 const bool
26 Compiler::getUseRelationSharing() const{
27 if(g_use_copyanon){
28 return TRUE;
29 }
30 return FALSE;
31 }
32
33 void
34 Compiler::setUseRelationSharing(const bool &use_relation_sharing){
35 if(use_relation_sharing){
36 g_use_copyanon = 1;
37 }
38 g_use_copyanon = 0;
39 }
40
41 Compiler *getCompiler(){
42 return Compiler::instance();
43 }

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