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

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

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

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
[212]13class MetaImpl : public Jenga::Common::BoostSerializationSupport<MetaImpl>
[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 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 );
[209]58 ar & BOOST_SERIALIZATION_NVP( dllProcs );
[206]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
[191]70public:
[193]71 MetaImpl()
[206]72 : classesImpl()
[191]73 , pNowClassesForDebugger( &classesImpl )
74 {
75 }
[193]76
77 const NamespaceScopesCollection &GetNamespaces() const
[191]78 {
[193]79 return namespaceScopesCollection;
[191]80 }
[193]81 NamespaceScopesCollection &GetNamespaces()
82 {
83 return namespaceScopesCollection;
84 }
[191]85
[206]86 const UserProcs &GetUserProcs() const
[191]87 {
[206]88 return userProcs;
89 }
90 UserProcs &GetUserProcs()
91 {
92 return userProcs;
93 }
94
[209]95 const DllProcs &GetDllProcs() const
96 {
97 return dllProcs;
98 }
99 DllProcs &GetDllProcs()
100 {
101 return dllProcs;
102 }
103
[206]104 Classes &GetClasses()
105 {
[191]106 return *pNowClassesForDebugger;
107 }
[206]108 void SetClasses( Classes *pClasses )
[191]109 {
110 this->pNowClassesForDebugger = pClasses;
111 }
112
[206]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
[193]140 BlittableTypes &GetBlittableTypes()
141 {
142 return blittableTypes;
143 }
144
145 TypeDefCollection &GetTypeDefs()
146 {
147 return typeDefs;
148 }
149
[206]150 // 関数ポインタ
151 ProcPointers &GetProcPointers()
[191]152 {
[206]153 return procPointers;
154 }
[191]155};
Note: See TracBrowser for help on using the repository browser.