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

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

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

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