source: dev/trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h@ 797

Last change on this file since 797 was 640, checked in by dai_9181, 16 years ago

静的リンクリンカの依存関係解決モジュールを製作中

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