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

Last change on this file since 302 was 288, checked in by dai_9181, 17 years ago
File size: 2.9 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 // グローバル変数
[288]28 GlobalVars globalVars;
[206]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
[272]73 // 初期化
74 void Clear();
75
[270]76 // 静的リンク
[280]77 void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
[270]78
[193]79 const NamespaceScopesCollection &GetNamespaces() const
[191]80 {
[193]81 return namespaceScopesCollection;
[191]82 }
[193]83 NamespaceScopesCollection &GetNamespaces()
84 {
85 return namespaceScopesCollection;
86 }
[191]87
[206]88 const UserProcs &GetUserProcs() const
[191]89 {
[206]90 return userProcs;
91 }
92 UserProcs &GetUserProcs()
93 {
94 return userProcs;
95 }
96
[209]97 const DllProcs &GetDllProcs() const
98 {
99 return dllProcs;
100 }
101 DllProcs &GetDllProcs()
102 {
103 return dllProcs;
104 }
105
[206]106 Classes &GetClasses()
107 {
[191]108 return *pNowClassesForDebugger;
109 }
[206]110 void SetClasses( Classes *pClasses )
[191]111 {
112 this->pNowClassesForDebugger = pClasses;
113 }
114
[288]115 const GlobalVars &GetGlobalVars() const
[206]116 {
117 return globalVars;
118 }
[288]119 GlobalVars &GetGlobalVars()
[206]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
[193]142 BlittableTypes &GetBlittableTypes()
143 {
144 return blittableTypes;
145 }
146
147 TypeDefCollection &GetTypeDefs()
148 {
149 return typeDefs;
150 }
151
[206]152 // 関数ポインタ
153 ProcPointers &GetProcPointers()
[191]154 {
[206]155 return procPointers;
156 }
[191]157};
Note: See TracBrowser for help on using the repository browser.