source: dev/trunk/abdev/BasicCompiler_Common/include/Compiler.h@ 265

Last change on this file since 265 was 265, checked in by dai_9181, 17 years ago
File size: 1.1 KB
Line 
1#pragma once
2
3#include <CodeGenerator.h>
4#include <NamespaceSupporter.h>
5#include <Meta.h>
6#include <DataTable.h>
7#include <CodeGenerator.h>
8#include <Linker.h>
9
10class Compiler
11{
12 // 名前空間サポート
13 NamespaceSupporter namespaceSupporter;
14
15 // オブジェクトモジュール
16 ObjectModule *pObjectModule;
17 ObjectModule *pNowObjectModule;
18
19public:
20
21 Compiler()
22 : pObjectModule( new ObjectModule )
23 , pNowObjectModule( pObjectModule )
24 {
25 }
26 ~Compiler()
27 {
28 delete pObjectModule;
29 }
30
31 NamespaceSupporter &GetNamespaceSupporter()
32 {
33 return namespaceSupporter;
34 }
35
36 // コード生成機構
37 CodeGenerator codeGenerator;
38
39 // リンカ
40 Linker linker;
41
42 ObjectModule &GetObjectModule()
43 {
44 return *pNowObjectModule;
45 }
46 void SelectObjectModule( ObjectModule &objectModule )
47 {
48 pNowObjectModule = &objectModule;
49 }
50
51 static bool StringToType( const std::string &typeName, Type &type );
52 static const std::string TypeToString( const Type &type );
53
54 // コンパイル中のクラス
55 const CClass *pCompilingClass;
56};
57
58extern Compiler compiler;
Note: See TracBrowser for help on using the repository browser.