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

Last change on this file since 260 was 256, checked in by dai_9181, 17 years ago

MetaImplを廃止し、Metaにした。
ObjectModuleクラス、Linkerクラスを用意。

File size: 2.8 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 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 Classes &GetClasses()
101 {
102 return *pNowClassesForDebugger;
103 }
104 void SetClasses( Classes *pClasses )
105 {
106 this->pNowClassesForDebugger = pClasses;
107 }
108
109 const Variables &GetGlobalVars() const
110 {
111 return globalVars;
112 }
113 Variables &GetGlobalVars()
114 {
115 return globalVars;
116 }
117
118 const Consts &GetGlobalConsts() const
119 {
120 return globalConsts;
121 }
122 Consts &GetGlobalConsts()
123 {
124 return globalConsts;
125 }
126
127 const ConstMacros &GetGlobalConstMacros() const
128 {
129 return globalConstMacros;
130 }
131 ConstMacros &GetGlobalConstMacros()
132 {
133 return globalConstMacros;
134 }
135
136 BlittableTypes &GetBlittableTypes()
137 {
138 return blittableTypes;
139 }
140
141 TypeDefCollection &GetTypeDefs()
142 {
143 return typeDefs;
144 }
145
146 // 関数ポインタ
147 ProcPointers &GetProcPointers()
148 {
149 return procPointers;
150 }
151};
Note: See TracBrowser for help on using the repository browser.