Changeset 566 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
- Timestamp:
- May 6, 2008, 1:41:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
r565 r566 648 648 } 649 649 650 const CClass *Classes::Find( const NamespaceScopes &namespaceScopes, const std::string &name ) const 651 { 652 if( namespaceScopes.size() == 0 && name == "Object" ){ 650 const CClass *Classes::FindEx( const NamespaceScopes &namespaceScopes, const std::string &name ) const 651 { 652 if( namespaceScopes.size() == 0 && name == "Object" ) 653 { 653 654 return GetObjectClassPtr(); 654 655 } 655 else if( namespaceScopes.size() == 0 && name == "String" ){ 656 else if( namespaceScopes.size() == 0 && name == "String" ) 657 { 656 658 return GetStringClassPtr(); 657 659 } … … 683 685 } 684 686 685 // TypeDefも見る686 int index = compiler.GetObjectModule().meta.GetTypeDefs().GetIndex( namespaceScopes, name );687 if( index != -1 ){688 Type type = compiler.GetObjectModule().meta.GetTypeDefs()[index].GetBaseType();689 if( type.IsObject() ){690 return &type.GetClass();691 }692 }693 694 687 return NULL; 695 688 } 696 const CClass *Classes::Find ( const std::string &fullName ) const689 const CClass *Classes::FindEx( const std::string &fullName ) const 697 690 { 698 691 char AreaName[VN_SIZE] = ""; //オブジェクト変数 … … 700 693 bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName ); 701 694 702 return Find ( NamespaceScopes( AreaName ), NestName );695 return FindEx( NamespaceScopes( AreaName ), NestName ); 703 696 } 704 697 … … 707 700 if( !pStringClass ){ 708 701 // キャッシュしておく 709 pStringClass = this->Find ( NamespaceScopes( "System" ), "String" );702 pStringClass = this->FindEx( NamespaceScopes( "System" ), "String" ); 710 703 711 704 if( !pStringClass ) … … 723 716 if( !pObjectClass ){ 724 717 // キャッシュしておく 725 pObjectClass = this->Find ( NamespaceScopes( "System" ), "Object" );718 pObjectClass = this->FindEx( NamespaceScopes( "System" ), "Object" ); 726 719 727 720 if( !pObjectClass ) … … 739 732 if( !pInterfaceInfo ){ 740 733 // キャッシュしておく 741 pInterfaceInfo = this->Find ( "ActiveBasic.Core.InterfaceInfo" );734 pInterfaceInfo = this->FindEx( "ActiveBasic.Core.InterfaceInfo" ); 742 735 743 736 if( !pInterfaceInfo )
Note:
See TracChangeset
for help on using the changeset viewer.