source: dev/trunk/abdev/BasicCompiler_Common/include/Meta.h@ 406

Last change on this file since 406 was 322, checked in by dai_9181, 17 years ago

コンパイラ組み込みテンプレートエンジンを実装。
静的リンクライブラリ、デバッグ情報の内部形式をテキストからバイナリに変更した。

File size: 3.0 KB
Line 
1#pragma once
2
3#include <BoostSerializationSupport.h>
4
5#include <option.h>
6#include <Program.h>
7#include <Class.h>
8#include <Procedure.h>
9#include <TypeDef.h>
10#include <Variable.h>
11#include <Const.h>
12#include <Delegate.h>
13
14class Meta
15{
16 // 名前空間
17 NamespaceScopesCollection namespaceScopesCollection;
18
19 // 関数・メソッド
20 UserProcs userProcs;
21
22 // DLL関数
23 DllProcs dllProcs;
24
25 // クラス
26 Classes classesImpl;
27
28 // グローバル変数
29 GlobalVars globalVars;
30
31 // グローバル定数
32 Consts globalConsts;
33
34 // グローバル定数マクロ
35 ConstMacros globalConstMacros;
36
37 // blittable型
38 BlittableTypes blittableTypes;
39
40 // TypeDef
41 TypeDefCollection typeDefs;
42
43 // 関数ポインタ
44 ProcPointers procPointers;
45
46 // デリゲート
47 Delegates delegates;
48
49 // XMLシリアライズ用
50private:
51 friend class boost::serialization::access;
52 template<class Archive> void serialize(Archive& ar, const unsigned int version)
53 {
54 trace_for_serialize( "serializing - Meta" );
55
56 ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
57 ar & BOOST_SERIALIZATION_NVP( userProcs );
58 ar & BOOST_SERIALIZATION_NVP( dllProcs );
59 ar & BOOST_SERIALIZATION_NVP( classesImpl );
60 ar & BOOST_SERIALIZATION_NVP( globalVars );
61 ar & BOOST_SERIALIZATION_NVP( globalConsts );
62 ar & BOOST_SERIALIZATION_NVP( globalConstMacros );
63 ar & BOOST_SERIALIZATION_NVP( blittableTypes );
64 ar & BOOST_SERIALIZATION_NVP( typeDefs );
65 ar & BOOST_SERIALIZATION_NVP( procPointers );
66 ar & BOOST_SERIALIZATION_NVP( delegates );
67 }
68
69 Classes *pNowClassesForDebugger;
70
71public:
72 Meta()
73 : classesImpl()
74 , pNowClassesForDebugger( &classesImpl )
75 {
76 }
77
78 // 初期化
79 void Clear();
80
81 // 静的リンク
82 void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
83
84 const NamespaceScopesCollection &GetNamespaces() const
85 {
86 return namespaceScopesCollection;
87 }
88 NamespaceScopesCollection &GetNamespaces()
89 {
90 return namespaceScopesCollection;
91 }
92
93 const UserProcs &GetUserProcs() const
94 {
95 return userProcs;
96 }
97 UserProcs &GetUserProcs()
98 {
99 return userProcs;
100 }
101
102 const DllProcs &GetDllProcs() const
103 {
104 return dllProcs;
105 }
106 DllProcs &GetDllProcs()
107 {
108 return dllProcs;
109 }
110
111 Classes &GetClasses()
112 {
113 return *pNowClassesForDebugger;
114 }
115 void SetClasses( Classes *pClasses )
116 {
117 this->pNowClassesForDebugger = pClasses;
118 }
119
120 const GlobalVars &GetGlobalVars() const
121 {
122 return globalVars;
123 }
124 GlobalVars &GetGlobalVars()
125 {
126 return globalVars;
127 }
128
129 const Consts &GetGlobalConsts() const
130 {
131 return globalConsts;
132 }
133 Consts &GetGlobalConsts()
134 {
135 return globalConsts;
136 }
137
138 const ConstMacros &GetGlobalConstMacros() const
139 {
140 return globalConstMacros;
141 }
142 ConstMacros &GetGlobalConstMacros()
143 {
144 return globalConstMacros;
145 }
146
147 BlittableTypes &GetBlittableTypes()
148 {
149 return blittableTypes;
150 }
151
152 TypeDefCollection &GetTypeDefs()
153 {
154 return typeDefs;
155 }
156
157 ProcPointers &GetProcPointers()
158 {
159 return procPointers;
160 }
161
162 Delegates &GetDelegates()
163 {
164 return delegates;
165 }
166};
Note: See TracBrowser for help on using the repository browser.