source: dev/trunk/abdev/BasicCompiler_Common/include/MetaImpl.h@ 237

Last change on this file since 237 was 215, checked in by dai_9181, 17 years ago

BoostSerializationSupportのクラステンプレートインスタンスを明示的に生成するようにした(コンパイル時間の短縮)

File size: 2.9 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 MetaImpl : public Jenga::Common::BoostSerializationSupport<MetaImpl>
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 virtual const char *RootTagName() const
48 {
49 return "metaImpl";
50 }
51 friend class boost::serialization::access;
52 template<class Archive> void serialize(Archive& ar, const unsigned int version)
53 {
54 trace_for_serialize( "serializing - MetaImpl" );
55
56 ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
57 ar & BOOST_SERIALIZATION_NVP( userProcs );
58 ar & BOOST_SERIALIZATION_NVP( dllProcs );
59 ar & BOOST_SERIALIZATION_NVP( classesImpl );
60 ar & BOOST_SERIALIZATION_NVP( globalVars );
61 ar & BOOST_SERIALIZATION_NVP( globalConsts );
62 ar & BOOST_SERIALIZATION_NVP( globalConstMacros );
63 ar & BOOST_SERIALIZATION_NVP( blittableTypes );
64 ar & BOOST_SERIALIZATION_NVP( typeDefs );
65 ar & BOOST_SERIALIZATION_NVP( procPointers );
66 }
67
68 Classes *pNowClassesForDebugger;
69
70public:
71 MetaImpl()
72 : classesImpl()
73 , pNowClassesForDebugger( &classesImpl )
74 {
75 }
76
77 const NamespaceScopesCollection &GetNamespaces() const
78 {
79 return namespaceScopesCollection;
80 }
81 NamespaceScopesCollection &GetNamespaces()
82 {
83 return namespaceScopesCollection;
84 }
85
86 const UserProcs &GetUserProcs() const
87 {
88 return userProcs;
89 }
90 UserProcs &GetUserProcs()
91 {
92 return userProcs;
93 }
94
95 const DllProcs &GetDllProcs() const
96 {
97 return dllProcs;
98 }
99 DllProcs &GetDllProcs()
100 {
101 return dllProcs;
102 }
103
104 Classes &GetClasses()
105 {
106 return *pNowClassesForDebugger;
107 }
108 void SetClasses( Classes *pClasses )
109 {
110 this->pNowClassesForDebugger = pClasses;
111 }
112
113 const Variables &GetGlobalVars() const
114 {
115 return globalVars;
116 }
117 Variables &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 // 関数ポインタ
151 ProcPointers &GetProcPointers()
152 {
153 return procPointers;
154 }
155};
Note: See TracBrowser for help on using the repository browser.