#include "stdafx.h" #include void Meta::Clear() { // 名前空間 namespaceScopesCollection.clear(); // 関数・メソッド userProcs.Clear(); // DLL関数 dllProcs.Clear(); // クラス classesImpl.Clear(); // グローバル変数 globalVars.Clear(); // グローバル定数 globalConsts.Clear(); // グローバル定数マクロ globalConstMacros.Clear(); // blittable型 blittableTypes.clear(); // TypeDef typeDefs.clear(); // 関数ポインタ procPointers.Clear(); } void Meta::StaticLink( Meta &meta, long dataSectionBaseOffset ) { // 名前空間 BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection ) { if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) ) { this->namespaceScopesCollection.push_back( namespaceScopes ); } } // 関数・メソッド meta.GetUserProcs().Iterator_Reset(); while( meta.GetUserProcs().Iterator_HasNext() ) { UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext(); pUserProc->isTargetObjectModule = false; pUserProc->GetNativeCode().ResetDataSectionBaseOffset( dataSectionBaseOffset ); this->userProcs.Put( pUserProc ); } meta.GetUserProcs().PullOutAll(); // DLL関数 meta.GetDllProcs().Iterator_Reset(); while( meta.GetDllProcs().Iterator_HasNext() ) { DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext(); pDllProc->isTargetObjectModule = false; this->dllProcs.Put( pDllProc ); } meta.GetDllProcs().PullOutAll(); // クラス meta.GetClasses().Iterator_Reset(); while( meta.GetClasses().Iterator_HasNext() ) { CClass *pClass = meta.GetClasses().Iterator_GetNext(); pClass->isTargetObjectModule = false; this->GetClasses().Put( pClass ); } meta.GetClasses().PullOutAll(); // グローバル変数 BOOST_FOREACH( Variable *pVar, meta.globalVars ) { pVar->isTargetObjectModule = false; this->globalVars.Add( pVar ); } meta.globalVars.PullOutAll(); // グローバル定数 meta.GetGlobalConsts().Iterator_Reset(); while( meta.GetGlobalConsts().Iterator_HasNext() ) { CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext(); pConst->isTargetObjectModule = false; this->GetGlobalConsts().Put( pConst ); } meta.GetGlobalConsts().PullOutAll(); // グローバル定数マクロ meta.GetGlobalConstMacros().Iterator_Reset(); while( meta.GetGlobalConstMacros().Iterator_HasNext() ) { ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext(); pConstMacro->isTargetObjectModule = false; this->GetGlobalConstMacros().Put( pConstMacro ); } meta.GetGlobalConstMacros().PullOutAll(); // blittable型 BOOST_FOREACH( BlittableType &blittableType, meta.blittableTypes ) { blittableType.isTargetObjectModule = false; this->blittableTypes.push_back( blittableType ); } meta.blittableTypes.clear(); // TypeDef BOOST_FOREACH( TypeDef &typeDef, meta.typeDefs ) { typeDef.isTargetObjectModule = false; this->typeDefs.push_back( typeDef ); } meta.typeDefs.clear(); // 関数ポインタ BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers ) { pProcPointer->isTargetObjectModule = false; this->procPointers.push_back( pProcPointer ); } meta.procPointers.PullOutAll(); }