Changeset 750 in dev for trunk/ab5.0/abdev/ab_common/src/Lexical
- Timestamp:
- Sep 24, 2008, 2:02:16 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev/ab_common/src/Lexical
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
r735 r750 99 99 // 仮想関数になるメソッドに使用チェックをつける 100 100 const CClass &_class = *this; 101 BOOST_FOREACH( const CMethod *pMethod, _class.GetDynamicMethods() )101 foreach( const CMethod *pMethod, _class.GetDynamicMethods() ) 102 102 { 103 103 if( pMethod->IsVirtual() ) … … 108 108 109 109 // インターフェイスメソッドに使用チェックをつける 110 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )111 { 112 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() )110 foreach( const ::Interface *pInterface, _class.GetInterfaces() ) 111 { 112 foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ) 113 113 { 114 114 pMethod->GetUserProc().Using(); … … 210 210 bool CClass::IsInheritsInterface( const CClass *pInterfaceClass ) const 211 211 { 212 BOOST_FOREACH( const ::Interface *pInterface, interfaces ){212 foreach( const ::Interface *pInterface, interfaces ){ 213 213 if( pInterfaceClass == &pInterface->GetClass() ){ 214 214 return true; … … 223 223 const Methods& inheritsClassMethods = inheritsClass.GetDynamicMethods(); 224 224 GetDynamicMethods().reserve( inheritsClassMethods.size() ); 225 BOOST_FOREACH( const CMethod *pBaseMethod, inheritsClassMethods ){225 foreach( const CMethod *pBaseMethod, inheritsClassMethods ){ 226 226 CMethod *pMethod = new DynamicMethod( *pBaseMethod ); 227 227 … … 256 256 const Interfaces& inheritsClassInterfaces = inheritsClass.GetInterfaces(); 257 257 interfaces.reserve( inheritsClassInterfaces.size() ); 258 BOOST_FOREACH( const ::Interface *pInterface, inheritsClassInterfaces )258 foreach( const ::Interface *pInterface, inheritsClassInterfaces ) 259 259 { 260 260 interfaces.push_back( new ::Interface( *pInterface ) ); … … 298 298 299 299 //メソッド 300 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){300 foreach( const CMethod *pMethod, GetDynamicMethods() ){ 301 301 if( name == pMethod->GetUserProc().GetName() ){ 302 302 return 1; … … 320 320 321 321 // 動的メンバ 322 BOOST_FOREACH( const Member *pMember, dynamicMembers )322 foreach( const Member *pMember, dynamicMembers ) 323 323 { 324 324 if( GetName() == pMember->GetName() ) … … 329 329 330 330 // 静的メンバ 331 BOOST_FOREACH( Member *pMember, staticMembers ){331 foreach( Member *pMember, staticMembers ){ 332 332 if( GetName() == pMember->GetName() ){ 333 333 return true; … … 350 350 } 351 351 352 BOOST_FOREACH( Member *pMember, GetDynamicMembers() )352 foreach( Member *pMember, GetDynamicMembers() ) 353 353 { 354 354 if( pMember->GetName() == memberName ) … … 366 366 367 367 // インターフェイス メソッド 368 BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )368 foreach( ::Interface *pInterface, GetInterfaces() ) 369 369 { 370 370 pInterface->GetDynamicMethods().Enum( methodName, subs ); … … 379 379 { 380 380 // インターフェイス メソッド 381 BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )381 foreach( ::Interface *pInterface, GetInterfaces() ) 382 382 { 383 383 result = pInterface->GetDynamicMethods().GetMethodPtr( pUserProc ); … … 446 446 } 447 447 448 BOOST_FOREACH( Member *pMember, dynamicMembers )448 foreach( Member *pMember, dynamicMembers ) 449 449 { 450 450 const Type& memberType = pMember->GetType(); … … 553 553 } 554 554 555 BOOST_FOREACH( Member *pMember, dynamicMembers )555 foreach( Member *pMember, dynamicMembers ) 556 556 { 557 557 // メンバサイズ … … 654 654 } 655 655 656 BOOST_FOREACH( Member *pMember, dynamicMembers )656 foreach( Member *pMember, dynamicMembers ) 657 657 { 658 658 int tempAlignment = pMember->GetType().GetSize(); … … 678 678 679 679 vtblIndex = 0; 680 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){680 foreach( const CMethod *pMethod, GetDynamicMethods() ){ 681 681 if( &pMethod->GetUserProc() == pUserProc ) 682 682 { … … 690 690 } 691 691 692 BOOST_FOREACH( const ::Interface *pInterface, interfaces )692 foreach( const ::Interface *pInterface, interfaces ) 693 693 { 694 694 vtblMasterListIndex++; 695 695 696 696 vtblIndex = 0; 697 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){697 foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ){ 698 698 if( &pMethod->GetUserProc() == pUserProc ) 699 699 { … … 715 715 int result = 0; 716 716 717 BOOST_FOREACH( const ::Interface *pInterface, interfaces )717 foreach( const ::Interface *pInterface, interfaces ) 718 718 { 719 719 result++; … … 742 742 // 未実装(abstract)の仮想関数を持つ場合はtrueを返す 743 743 744 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){744 foreach( const CMethod *pMethod, GetDynamicMethods() ){ 745 745 if(pMethod->IsVirtual()){ 746 746 if(pMethod->IsAbstract()){ … … 751 751 752 752 // インターフェイスのvtbl 753 BOOST_FOREACH( const ::Interface *pInterface, interfaces )754 { 755 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){753 foreach( const ::Interface *pInterface, interfaces ) 754 { 755 foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ){ 756 756 if(pMethod->IsVirtual()){ 757 757 if(pMethod->IsAbstract()){ … … 791 791 pClass = classes.front(); 792 792 793 BOOST_FOREACH( const CClass *pTempClass, classes )793 foreach( const CClass *pTempClass, classes ) 794 794 { 795 795 if( pClass->GetNamespaceScopes().size() < pTempClass->GetNamespaceScopes().size() ) … … 837 837 std::string result; 838 838 839 BOOST_FOREACH( const Member *pMember, dynamicMembers )839 foreach( const Member *pMember, dynamicMembers ) 840 840 { 841 841 if( result.size() ) … … 853 853 std::string result; 854 854 855 BOOST_FOREACH( const Member *pMember, dynamicMembers )855 foreach( const Member *pMember, dynamicMembers ) 856 856 { 857 857 if( result.size() ) … … 874 874 { 875 875 const CClass &thisClass = *this; 876 BOOST_FOREACH( const Member *pMember, thisClass.GetDynamicMembers() )876 foreach( const Member *pMember, thisClass.GetDynamicMembers() ) 877 877 { 878 878 if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() ) … … 935 935 936 936 // 実装するインターフェイス 937 BOOST_FOREACH( ::Interface *pInterface, interfaces )937 foreach( ::Interface *pInterface, interfaces ) 938 938 { 939 939 pInterface->Resolve( resolver, resolveErrors ); … … 941 941 942 942 // 動的メンバ 943 BOOST_FOREACH( Member *pMember, dynamicMembers )943 foreach( Member *pMember, dynamicMembers ) 944 944 { 945 945 pMember->Resolve( resolver, resolveErrors ); … … 947 947 948 948 // 静的メンバ 949 BOOST_FOREACH( Member *pMember, staticMembers )949 foreach( Member *pMember, staticMembers ) 950 950 { 951 951 pMember->Resolve( resolver, resolveErrors ); … … 953 953 954 954 // 動的メソッド 955 BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() )955 foreach( CMethod *pMethod, GetDynamicMethods() ) 956 956 { 957 957 pMethod->Resolve( resolver, resolveErrors ); … … 959 959 960 960 // 静的メソッド 961 BOOST_FOREACH( CMethod *pMethod, staticMethods )961 foreach( CMethod *pMethod, staticMethods ) 962 962 { 963 963 pMethod->Resolve( resolver, resolveErrors ); … … 965 965 966 966 // テンプレート展開後のクラス 967 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses )967 foreach( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses ) 968 968 { 969 969 pExpandedTemplateClass->Resolve( resolver, resolveErrors ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp
r747 r750 59 59 void DataTable::ResetDataSectionBaseOffset( long dataSectionBaseOffset ) 60 60 { 61 BOOST_FOREACH( const Schedule &schedule, schedules )61 foreach( const Schedule &schedule, schedules ) 62 62 { 63 63 if( schedule.GetType() == Schedule::DataTable ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp
r640 r750 23 23 Procedure::Resolve( resolver, resolveErrors ); 24 24 25 BOOST_FOREACH( Parameter *pParameter, dynamicParams )25 foreach( Parameter *pParameter, dynamicParams ) 26 26 { 27 27 pParameter->Resolve( resolver, resolveErrors ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp
r640 r750 8 8 { 9 9 //メソッドをコピー 10 BOOST_FOREACH( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() )10 foreach( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() ) 11 11 { 12 12 CMethod *pMethod = new DynamicMethod( *pBaseMethod ); … … 57 57 { 58 58 std::string actualGenericTypesName; 59 BOOST_FOREACH( const Type &typeParameter, actualTypeParameters )59 foreach( const Type &typeParameter, actualTypeParameters ) 60 60 { 61 61 if( actualGenericTypesName.size() ) … … 74 74 { 75 75 // 動的メソッド 76 BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() )76 foreach( CMethod *pMethod, GetDynamicMethods() ) 77 77 { 78 78 pMethod->Resolve( resolver, resolveErrors ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r640 r750 99 99 // グローバル変数 100 100 long initAreaBaseOffset = this->globalVars.initAreaBuffer.GetSize(); 101 BOOST_FOREACH( Variable *pVar, meta.globalVars )101 foreach( Variable *pVar, meta.globalVars ) 102 102 { 103 103 if( pVar->IsExternal() ) … … 186 186 187 187 // 関数ポインタ 188 BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers )188 foreach( ProcPointer *pProcPointer, meta.procPointers ) 189 189 { 190 190 if( pProcPointer->IsExternal() ) … … 283 283 284 284 // グローバル変数 285 BOOST_FOREACH( Variable *pVar, globalVars )285 foreach( Variable *pVar, globalVars ) 286 286 { 287 287 pVar->Resolve( resolver, resolveErrors ); … … 319 319 320 320 // 関数ポインタ 321 BOOST_FOREACH( ProcPointer *pProcPointer, procPointers )321 foreach( ProcPointer *pProcPointer, procPointers ) 322 322 { 323 323 pProcPointer->Resolve( resolver, resolveErrors ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
r640 r750 92 92 Methods::Methods( const Methods &methods ) 93 93 { 94 BOOST_FOREACH( CMethod *pMethod, methods )94 foreach( CMethod *pMethod, methods ) 95 95 { 96 96 this->push_back( new DynamicMethod( dynamic_cast<DynamicMethod &>(*pMethod) ) ); … … 101 101 { 102 102 Methods &methods = *this; 103 BOOST_FOREACH( CMethod *pMethod, methods )103 foreach( CMethod *pMethod, methods ) 104 104 { 105 105 delete pMethod; … … 122 122 //メソッドのオーバーライド 123 123 Methods &methods = *this; 124 BOOST_FOREACH( CMethod *pMethod, methods )124 foreach( CMethod *pMethod, methods ) 125 125 { 126 126 if( !pMethod->IsNotUse() && pMethod->GetUserProc().IsEqualForOverride( actualTypeParametersForThisMethods, pUserProc ) ) … … 145 145 { 146 146 const Methods &methods = *this; 147 BOOST_FOREACH( const CMethod *pMethod, methods ){147 foreach( const CMethod *pMethod, methods ){ 148 148 if( pMethod->GetUserProc().GetName() == name ) return true; 149 149 } … … 181 181 int count = 0; 182 182 const Methods &methods = *this; 183 BOOST_FOREACH( const CMethod *pMethod, methods )183 foreach( const CMethod *pMethod, methods ) 184 184 { 185 185 if( pMethod->IsVirtual() ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp
r736 r750 47 47 48 48 // Importsされている名前空間とのマッチングを試みる 49 BOOST_FOREACH( const NamespaceScopes &importedNamespaceScopes, GetImportedNamespaces() )49 foreach( const NamespaceScopes &importedNamespaceScopes, GetImportedNamespaces() ) 50 50 { 51 51 if( base.IsEqual( importedNamespaceScopes + entry ) ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp
r645 r750 84 84 85 85 // スケジュールを追加 86 BOOST_FOREACH( const Schedule &schedule, nativeCode.schedules )86 foreach( const Schedule &schedule, nativeCode.schedules ) 87 87 { 88 88 this->schedules.push_back( … … 96 96 97 97 // ソースコード行番号とネイティブコード位置の対応情報を追加 98 BOOST_FOREACH( const SourceLine &sourceLine, nativeCode.sourceLines )98 foreach( const SourceLine &sourceLine, nativeCode.sourceLines ) 99 99 { 100 100 this->sourceLines.push_back( … … 191 191 void NativeCode::ResetDataSectionBaseOffset( long dataSectionBaseOffset ) 192 192 { 193 BOOST_FOREACH( const Schedule &schedule, schedules )193 foreach( const Schedule &schedule, schedules ) 194 194 { 195 195 if( schedule.GetType() == Schedule::DataTable ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp
r640 r750 11 11 #include <sstream> 12 12 13 #define WIN32_LEAN_AND_MEAN 13 14 #include <windows.h> 14 15 #include <stdio.h> 15 16 #include <string.h> 16 17 #include <math.h> 17 #include <commctrl.h>18 18 #include <time.h> 19 19 #include <limits.h> 20 20 #include <shlobj.h> 21 #include <process.h>22 #include <fcntl.h>23 #include <io.h>24 #include <shlwapi.h>25 21 #include <tchar.h> 26 #include <stdarg.h>27 22 28 23 //boost libraries … … 52 47 #include <boost/serialization/export.hpp> 53 48 49 #define foreach(v, c) for each (v in c) 50 54 51 #include <jenga/include/jenga.h> 55 52 #include <abdev/ab_common/include/ab_common.h> … … 99 96 100 97 // リレーションテーブルを構築 101 BOOST_FOREACH( const std::string &oldRelationalObjectModuleName, oldRelationalObjectModuleNames )98 foreach( const std::string &oldRelationalObjectModuleName, oldRelationalObjectModuleNames ) 102 99 { 103 100 bool isMatch = false; … … 141 138 isSuccessful = true; 142 139 } 143 catch( boost::archive::archive_exception e )140 catch( boost::archive::archive_exception& e ) 144 141 { 145 142 MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK ); … … 174 171 isSuccessful = true; 175 172 } 176 catch( boost::archive::archive_exception e )173 catch( boost::archive::archive_exception& e ) 177 174 { 178 175 MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK ); … … 209 206 isSuccessful = true; 210 207 } 211 catch( boost::archive::archive_exception e )208 catch( boost::archive::archive_exception& e ) 212 209 { 213 210 MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK ); … … 245 242 isSuccessful = true; 246 243 } 247 catch( boost::archive::archive_exception e )244 catch( boost::archive::archive_exception &e ) 248 245 { 249 246 MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
r641 r750 14 14 bool Procedure::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ) 15 15 { 16 BOOST_FOREACH( Parameter *pParameter, params )16 foreach( Parameter *pParameter, params ) 17 17 { 18 18 pParameter->Resolve( resolver, resolveErrors ); … … 82 82 UserProc::~UserProc() 83 83 { 84 BOOST_FOREACH( Parameter *pParam, realParams ){84 foreach( Parameter *pParam, realParams ){ 85 85 delete pParam; 86 86 } … … 219 219 } 220 220 221 BOOST_FOREACH( Parameter *pParameter, realParams )221 foreach( Parameter *pParameter, realParams ) 222 222 { 223 223 pParameter->Resolve( resolver, resolveErrors ); 224 224 } 225 225 226 BOOST_FOREACH( Variable *pLocalVar, localVars )226 foreach( Variable *pLocalVar, localVars ) 227 227 { 228 228 pLocalVar->Resolve( resolver, resolveErrors ); … … 270 270 { 271 271 ProcPointers &procPointers = *this; 272 BOOST_FOREACH( ProcPointer *pProcPointer, procPointers ){272 foreach( ProcPointer *pProcPointer, procPointers ){ 273 273 delete pProcPointer; 274 274 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
r640 r750 524 524 { 525 525 std::string actualGenericTypesName; 526 BOOST_FOREACH( const GenericType &actualGenericType, actualGenericTypes )526 foreach( const GenericType &actualGenericType, actualGenericTypes ) 527 527 { 528 528 if( actualGenericTypesName.size() ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
r640 r750 26 26 { 27 27 const TypeDefCollection &typeDefs = *this; 28 BOOST_FOREACH( const TypeDef &typeDef, typeDefs )28 foreach( const TypeDef &typeDef, typeDefs ) 29 29 { 30 30 if( typeDef.IsEqualSymbol( symbol ) )
Note:
See TracChangeset
for help on using the changeset viewer.