[191] | 1 | #pragma once
|
---|
| 2 |
|
---|
[206] | 3 | #include <option.h>
|
---|
| 4 | #include <Program.h>
|
---|
| 5 | #include <Class.h>
|
---|
| 6 | #include <Procedure.h>
|
---|
[193] | 7 | #include <TypeDef.h>
|
---|
[206] | 8 | #include <Variable.h>
|
---|
| 9 | #include <Const.h>
|
---|
[322] | 10 | #include <Delegate.h>
|
---|
[191] | 11 |
|
---|
[256] | 12 | class Meta
|
---|
[191] | 13 | {
|
---|
[193] | 14 | // 名前空間
|
---|
| 15 | NamespaceScopesCollection namespaceScopesCollection;
|
---|
| 16 |
|
---|
[206] | 17 | // 関数・メソッド
|
---|
| 18 | UserProcs userProcs;
|
---|
| 19 |
|
---|
[209] | 20 | // DLL関数
|
---|
| 21 | DllProcs dllProcs;
|
---|
| 22 |
|
---|
[193] | 23 | // クラス
|
---|
[206] | 24 | Classes classesImpl;
|
---|
[191] | 25 |
|
---|
[206] | 26 | // グローバル変数
|
---|
[288] | 27 | GlobalVars globalVars;
|
---|
[206] | 28 |
|
---|
| 29 | // グローバル定数
|
---|
| 30 | Consts globalConsts;
|
---|
| 31 |
|
---|
| 32 | // グローバル定数マクロ
|
---|
| 33 | ConstMacros globalConstMacros;
|
---|
| 34 |
|
---|
[193] | 35 | // blittable型
|
---|
| 36 | BlittableTypes blittableTypes;
|
---|
| 37 |
|
---|
| 38 | // TypeDef
|
---|
| 39 | TypeDefCollection typeDefs;
|
---|
| 40 |
|
---|
[206] | 41 | // 関数ポインタ
|
---|
| 42 | ProcPointers procPointers;
|
---|
| 43 |
|
---|
[322] | 44 | // デリゲート
|
---|
| 45 | Delegates delegates;
|
---|
| 46 |
|
---|
[206] | 47 | // XMLシリアライズ用
|
---|
| 48 | private:
|
---|
| 49 | friend class boost::serialization::access;
|
---|
| 50 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 51 | {
|
---|
[256] | 52 | trace_for_serialize( "serializing - Meta" );
|
---|
[206] | 53 |
|
---|
| 54 | ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
|
---|
| 55 | ar & BOOST_SERIALIZATION_NVP( userProcs );
|
---|
[209] | 56 | ar & BOOST_SERIALIZATION_NVP( dllProcs );
|
---|
[206] | 57 | ar & BOOST_SERIALIZATION_NVP( classesImpl );
|
---|
| 58 | ar & BOOST_SERIALIZATION_NVP( globalVars );
|
---|
| 59 | ar & BOOST_SERIALIZATION_NVP( globalConsts );
|
---|
| 60 | ar & BOOST_SERIALIZATION_NVP( globalConstMacros );
|
---|
| 61 | ar & BOOST_SERIALIZATION_NVP( blittableTypes );
|
---|
| 62 | ar & BOOST_SERIALIZATION_NVP( typeDefs );
|
---|
| 63 | ar & BOOST_SERIALIZATION_NVP( procPointers );
|
---|
[322] | 64 | ar & BOOST_SERIALIZATION_NVP( delegates );
|
---|
[206] | 65 | }
|
---|
| 66 |
|
---|
| 67 | Classes *pNowClassesForDebugger;
|
---|
| 68 |
|
---|
[191] | 69 | public:
|
---|
[256] | 70 | Meta()
|
---|
[206] | 71 | : classesImpl()
|
---|
[191] | 72 | , pNowClassesForDebugger( &classesImpl )
|
---|
| 73 | {
|
---|
| 74 | }
|
---|
[193] | 75 |
|
---|
[272] | 76 | // 初期化
|
---|
| 77 | void Clear();
|
---|
| 78 |
|
---|
[270] | 79 | // 静的リンク
|
---|
[280] | 80 | void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
|
---|
[270] | 81 |
|
---|
[193] | 82 | const NamespaceScopesCollection &GetNamespaces() const
|
---|
[191] | 83 | {
|
---|
[193] | 84 | return namespaceScopesCollection;
|
---|
[191] | 85 | }
|
---|
[193] | 86 | NamespaceScopesCollection &GetNamespaces()
|
---|
| 87 | {
|
---|
| 88 | return namespaceScopesCollection;
|
---|
| 89 | }
|
---|
[191] | 90 |
|
---|
[206] | 91 | const UserProcs &GetUserProcs() const
|
---|
[191] | 92 | {
|
---|
[206] | 93 | return userProcs;
|
---|
| 94 | }
|
---|
| 95 | UserProcs &GetUserProcs()
|
---|
| 96 | {
|
---|
| 97 | return userProcs;
|
---|
| 98 | }
|
---|
| 99 |
|
---|
[209] | 100 | const DllProcs &GetDllProcs() const
|
---|
| 101 | {
|
---|
| 102 | return dllProcs;
|
---|
| 103 | }
|
---|
| 104 | DllProcs &GetDllProcs()
|
---|
| 105 | {
|
---|
| 106 | return dllProcs;
|
---|
| 107 | }
|
---|
| 108 |
|
---|
[206] | 109 | Classes &GetClasses()
|
---|
| 110 | {
|
---|
[191] | 111 | return *pNowClassesForDebugger;
|
---|
| 112 | }
|
---|
[206] | 113 | void SetClasses( Classes *pClasses )
|
---|
[191] | 114 | {
|
---|
| 115 | this->pNowClassesForDebugger = pClasses;
|
---|
| 116 | }
|
---|
| 117 |
|
---|
[288] | 118 | const GlobalVars &GetGlobalVars() const
|
---|
[206] | 119 | {
|
---|
| 120 | return globalVars;
|
---|
| 121 | }
|
---|
[288] | 122 | GlobalVars &GetGlobalVars()
|
---|
[206] | 123 | {
|
---|
| 124 | return globalVars;
|
---|
| 125 | }
|
---|
| 126 |
|
---|
| 127 | const Consts &GetGlobalConsts() const
|
---|
| 128 | {
|
---|
| 129 | return globalConsts;
|
---|
| 130 | }
|
---|
| 131 | Consts &GetGlobalConsts()
|
---|
| 132 | {
|
---|
| 133 | return globalConsts;
|
---|
| 134 | }
|
---|
| 135 |
|
---|
| 136 | const ConstMacros &GetGlobalConstMacros() const
|
---|
| 137 | {
|
---|
| 138 | return globalConstMacros;
|
---|
| 139 | }
|
---|
| 140 | ConstMacros &GetGlobalConstMacros()
|
---|
| 141 | {
|
---|
| 142 | return globalConstMacros;
|
---|
| 143 | }
|
---|
| 144 |
|
---|
[193] | 145 | BlittableTypes &GetBlittableTypes()
|
---|
| 146 | {
|
---|
| 147 | return blittableTypes;
|
---|
| 148 | }
|
---|
| 149 |
|
---|
| 150 | TypeDefCollection &GetTypeDefs()
|
---|
| 151 | {
|
---|
| 152 | return typeDefs;
|
---|
| 153 | }
|
---|
| 154 |
|
---|
[206] | 155 | ProcPointers &GetProcPointers()
|
---|
[191] | 156 | {
|
---|
[206] | 157 | return procPointers;
|
---|
| 158 | }
|
---|
[322] | 159 |
|
---|
| 160 | Delegates &GetDelegates()
|
---|
| 161 | {
|
---|
| 162 | return delegates;
|
---|
| 163 | }
|
---|
[191] | 164 | };
|
---|