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

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