Changeset 353 in dev for trunk/abdev/BasicCompiler_Common/src/Procedure.cpp
- Timestamp:
- Oct 21, 2007, 3:37:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.