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

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

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

File size: 2.8 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>
[191]12
[256]13class Meta
[191]14{
[193]15 // 名前空間
16 NamespaceScopesCollection namespaceScopesCollection;
17
[206]18 // 関数・メソッド
19 UserProcs userProcs;
20
[209]21 // DLL関数
22 DllProcs dllProcs;
23
[193]24 // クラス
[206]25 Classes classesImpl;
[191]26
[206]27 // グローバル変数
28 Variables globalVars;
29
30 // グローバル定数
31 Consts globalConsts;
32
33 // グローバル定数マクロ
34 ConstMacros globalConstMacros;
35
[193]36 // blittable型
37 BlittableTypes blittableTypes;
38
39 // TypeDef
40 TypeDefCollection typeDefs;
41
[206]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 {
[256]50 trace_for_serialize( "serializing - Meta" );
[206]51
52 ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
53 ar & BOOST_SERIALIZATION_NVP( userProcs );
[209]54 ar & BOOST_SERIALIZATION_NVP( dllProcs );
[206]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
[191]66public:
[256]67 Meta()
[206]68 : classesImpl()
[191]69 , pNowClassesForDebugger( &classesImpl )
70 {
71 }
[193]72
73 const NamespaceScopesCollection &GetNamespaces() const
[191]74 {
[193]75 return namespaceScopesCollection;
[191]76 }
[193]77 NamespaceScopesCollection &GetNamespaces()
78 {
79 return namespaceScopesCollection;
80 }
[191]81
[206]82 const UserProcs &GetUserProcs() const
[191]83 {
[206]84 return userProcs;
85 }
86 UserProcs &GetUserProcs()
87 {
88 return userProcs;
89 }
90
[209]91 const DllProcs &GetDllProcs() const
92 {
93 return dllProcs;
94 }
95 DllProcs &GetDllProcs()
96 {
97 return dllProcs;
98 }
99
[206]100 Classes &GetClasses()
101 {
[191]102 return *pNowClassesForDebugger;
103 }
[206]104 void SetClasses( Classes *pClasses )
[191]105 {
106 this->pNowClassesForDebugger = pClasses;
107 }
108
[206]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
[193]136 BlittableTypes &GetBlittableTypes()
137 {
138 return blittableTypes;
139 }
140
141 TypeDefCollection &GetTypeDefs()
142 {
143 return typeDefs;
144 }
145
[206]146 // 関数ポインタ
147 ProcPointers &GetProcPointers()
[191]148 {
[206]149 return procPointers;
150 }
[191]151};
Note: See TracBrowser for help on using the repository browser.