source: dev/trunk/abdev/BasicCompiler_Common/src/Meta.cpp@ 272

Last change on this file since 272 was 272, checked in by dai_9181, 17 years ago
File size: 3.1 KB
Line 
1#include "stdafx.h"
2
3#include <Compiler.h>
4
5void Meta::Clear()
6{
7 // 名前空間
8 namespaceScopesCollection.clear();
9
10 // 関数・メソッド
11 userProcs.Clear();
12
13 // DLL関数
14 dllProcs.Clear();
15
16 // クラス
17 classesImpl.Clear();
18
19 // グローバル変数
20 globalVars.Clear();
21
22 // グローバル定数
23 globalConsts.Clear();
24
25 // グローバル定数マクロ
26 globalConstMacros.Clear();
27
28 // blittable型
29 blittableTypes.clear();
30
31 // TypeDef
32 typeDefs.clear();
33
34 // 関数ポインタ
35 procPointers.Clear();
36}
37
38void Meta::StaticLink( Meta &meta )
39{
40 // 名前空間
41 BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection )
42 {
43 if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) )
44 {
45 this->namespaceScopesCollection.push_back( namespaceScopes );
46 }
47 }
48
49 // 関数・メソッド
50 meta.GetUserProcs().Iterator_Reset();
51 while( meta.GetUserProcs().Iterator_HasNext() )
52 {
53 UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext();
54 pUserProc->isTargetObjectModule = false;
55 this->userProcs.Put( pUserProc );
56 }
57 meta.GetUserProcs().PullOutAll();
58
59 // DLL関数
60 meta.GetDllProcs().Iterator_Reset();
61 while( meta.GetDllProcs().Iterator_HasNext() )
62 {
63 DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext();
64 pDllProc->isTargetObjectModule = false;
65 this->dllProcs.Put( pDllProc );
66 }
67 meta.GetDllProcs().PullOutAll();
68
69 // クラス
70 meta.GetClasses().Iterator_Reset();
71 while( meta.GetClasses().Iterator_HasNext() )
72 {
73 CClass *pClass = meta.GetClasses().Iterator_GetNext();
74 pClass->isTargetObjectModule = false;
75 this->GetClasses().Put( pClass );
76 }
77 meta.GetClasses().PullOutAll();
78
79 // グローバル変数
80 BOOST_FOREACH( Variable *pVar, meta.globalVars )
81 {
82 pVar->isTargetObjectModule = false;
83 this->globalVars.push_back( pVar );
84 }
85 meta.globalVars.PullOutAll();
86
87 // グローバル定数
88 meta.GetGlobalConsts().Iterator_Reset();
89 while( meta.GetGlobalConsts().Iterator_HasNext() )
90 {
91 CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext();
92 pConst->isTargetObjectModule = false;
93 this->GetGlobalConsts().Put( pConst );
94 }
95 meta.GetGlobalConsts().PullOutAll();
96
97 // グローバル定数マクロ
98 meta.GetGlobalConstMacros().Iterator_Reset();
99 while( meta.GetGlobalConstMacros().Iterator_HasNext() )
100 {
101 ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext();
102 pConstMacro->isTargetObjectModule = false;
103 this->GetGlobalConstMacros().Put( pConstMacro );
104 }
105 meta.GetGlobalConstMacros().PullOutAll();
106
107 // blittable型
108 BOOST_FOREACH( BlittableType &blittableType, meta.blittableTypes )
109 {
110 blittableType.isTargetObjectModule = false;
111 this->blittableTypes.push_back( blittableType );
112 }
113 meta.blittableTypes.clear();
114
115 // TypeDef
116 BOOST_FOREACH( TypeDef &typeDef, meta.typeDefs )
117 {
118 typeDef.isTargetObjectModule = false;
119 this->typeDefs.push_back( typeDef );
120 }
121 meta.typeDefs.clear();
122
123 // 関数ポインタ
124 BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers )
125 {
126 pProcPointer->isTargetObjectModule = false;
127 this->procPointers.push_back( pProcPointer );
128 }
129 meta.procPointers.PullOutAll();
130}
Note: See TracBrowser for help on using the repository browser.