Changeset 353 in dev for trunk/abdev/BasicCompiler_Common/src
- Timestamp:
- Oct 21, 2007, 3:37:31 PM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
r322 r353 34 34 35 35 #include <BoostSerializationSupport.h> 36 #include <Hashmap.h> 36 37 #include <Compiler.h> 37 38 -
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r352 r353 573 573 574 574 //関数ハッシュへ登録 575 UserProc *pUserProc = compiler.GetObjectModule().meta.GetUserProcs().Add( NamespaceScopes(), NamespaceScopesCollection(), buffer,nowLine,isVirtual,pobj_c, (bStatic!=0) ); 575 char interfaceName[VN_SIZE] = ""; 576 UserProc *pUserProc = compiler.GetObjectModule().meta.GetUserProcs().AddUserProc( NamespaceScopes(), NamespaceScopesCollection(), buffer,nowLine,isVirtual,pobj_c, (bStatic!=0), interfaceName ); 576 577 if(!pUserProc) return; 577 578 … … 657 658 BOOST_FOREACH( ::Interface *pInterface, pobj_c->GetInterfaces() ) 658 659 { 660 if( interfaceName[0] ) 661 { 662 if( pInterface->GetClass().GetName() != interfaceName ) 663 { 664 // 指定されたインターフェイス名と整合しないとき 665 continue; 666 } 667 } 668 659 669 CMethod *pMethodForOverride = pInterface->GetDynamicMethods().FindForOverride( pUserProc ); 660 670 if( pMethodForOverride ) … … 665 675 } 666 676 } 677 } 678 679 if( interfaceName[0] ) 680 { 681 SetError(139,interfaceName,nowLine); 667 682 } 668 683 -
trunk/abdev/BasicCompiler_Common/src/Method.cpp
r352 r353 77 77 BOOST_FOREACH( CMethod *pMethod, methods ) 78 78 { 79 if( pMethod->GetUserProc().IsEqualForOverride( pUserProc ) )79 if( !pMethod->IsNotUse() && pMethod->GetUserProc().IsEqualForOverride( pUserProc ) ) 80 80 { 81 81 return pMethod; -
trunk/abdev/BasicCompiler_Common/src/Procedure.cpp
r350 r353 451 451 return true; 452 452 } 453 UserProc *UserProcs::Add ( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic)453 UserProc *UserProcs::AddUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName ) 454 454 { 455 455 int i2,i3; … … 545 545 temporary[i2]=buffer[i]; 546 546 } 547 548 char parentName[VN_SIZE], memberName[VN_SIZE]; 549 ReferenceKind refKind; 550 if( SplitMemberName( temporary, parentName, memberName, refKind ) ) 551 { 552 if( pobj_c ) 553 { 554 if( interfaceName ) 555 { 556 lstrcpy( interfaceName, parentName ); 557 } 558 else 559 { 560 SetError(); 561 return NULL; 562 } 563 564 char dummyMemberName[VN_SIZE]; 565 if( SplitMemberName( memberName, parentName, dummyMemberName, refKind ) ) 566 { 567 SetError(69,temporary,nowLine); 568 return NULL; 569 } 570 } 571 else 572 { 573 SetError(68,temporary,nowLine); 574 return NULL; 575 } 576 577 lstrcpy( temporary, memberName ); 578 } 547 579 } 548 580 … … 573 605 // すべての関数・メソッドをコンパイルする 574 606 pUserProc->Using(); 607 } 608 609 // 親インターフェイスをセット 610 if( interfaceName && interfaceName[0] ) 611 { 612 ::Interface *pTargetInterface = NULL; 613 BOOST_FOREACH( ::Interface *pInterface, pobj_c->GetInterfaces() ) 614 { 615 if( pInterface->GetClass().GetName() == interfaceName ) 616 { 617 pTargetInterface = pInterface; 618 break; 619 } 620 } 621 pUserProc->SetInterface( pTargetInterface ); 575 622 } 576 623
Note:
See TracChangeset
for help on using the changeset viewer.