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

Last change on this file since 271 was 270, checked in by dai_9181, 17 years ago
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 // 静的リンク
74 void StaticLink( Meta &meta );
75
76 const NamespaceScopesCollection &GetNamespaces() const
77 {
78 return namespaceScopesCollection;
79 }
80 NamespaceScopesCollection &GetNamespaces()
81 {
82 return namespaceScopesCollection;
83 }
84
85 const UserProcs &GetUserProcs() const
86 {
87 return userProcs;
88 }
89 UserProcs &GetUserProcs()
90 {
91 return userProcs;
92 }
93
94 const DllProcs &GetDllProcs() const
95 {
96 return dllProcs;
97 }
98 DllProcs &GetDllProcs()
99 {
100 return dllProcs;
101 }
102
103 Classes &GetClasses()
104 {
105 return *pNowClassesForDebugger;
106 }
107 void SetClasses( Classes *pClasses )
108 {
109 this->pNowClassesForDebugger = pClasses;
110 }
111
112 const Variables &GetGlobalVars() const
113 {
114 return globalVars;
115 }
116 Variables &GetGlobalVars()
117 {
118 return globalVars;
119 }
120
121 const Consts &GetGlobalConsts() const
122 {
123 return globalConsts;
124 }
125 Consts &GetGlobalConsts()
126 {
127 return globalConsts;
128 }
129
130 const ConstMacros &GetGlobalConstMacros() const
131 {
132 return globalConstMacros;
133 }
134 ConstMacros &GetGlobalConstMacros()
135 {
136 return globalConstMacros;
137 }
138
139 BlittableTypes &GetBlittableTypes()
140 {
141 return blittableTypes;
142 }
143
144 TypeDefCollection &GetTypeDefs()
145 {
146 return typeDefs;
147 }
148
149 // 関数ポインタ
150 ProcPointers &GetProcPointers()
151 {
152 return procPointers;
153 }
154};
Note: See TracBrowser for help on using the repository browser.