Changeset 598 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
- Timestamp:
- May 10, 2008, 8:16:16 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
r597 r598 635 635 } 636 636 637 const CClass *Classes::FindEx( const NamespaceScopes &namespaceScopes, const std::string &name) const638 { 639 if( namespaceScopes.size() == 0 && name== "Object" )637 const CClass *Classes::FindEx( const Symbol &symbol ) const 638 { 639 if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "Object" ) 640 640 { 641 641 return GetObjectClassPtr(); 642 642 } 643 else if( namespaceScopes.size() == 0 && name== "String" )643 else if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "String" ) 644 644 { 645 645 return GetStringClassPtr(); … … 647 647 648 648 std::vector<const CClass *> classes; 649 const CClass *pClass = GetHashArrayElement( name.c_str() );649 const CClass *pClass = GetHashArrayElement( symbol.GetName().c_str() ); 650 650 while( pClass ) 651 651 { 652 if( pClass->IsEqualSymbol( namespaceScopes, name) ){652 if( pClass->IsEqualSymbol( symbol.GetNamespaceScopes(), symbol.GetName() ) ){ 653 653 //名前空間とクラス名が一致した 654 654 classes.push_back( pClass ); … … 674 674 return NULL; 675 675 } 676 const CClass *Classes::FindEx( const std::string &fullName ) const677 {678 char AreaName[VN_SIZE] = ""; //オブジェクト変数679 char NestName[VN_SIZE] = ""; //入れ子メンバ680 bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );681 682 return FindEx( NamespaceScopes( AreaName ), NestName );683 }684 676 685 677 const CClass *Classes::GetStringClassPtr() const … … 688 680 { 689 681 // キャッシュしておく 690 pStringClass = this->FindEx( NamespaceScopes( "System" ), "String");682 pStringClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "String" ) ); 691 683 } 692 684 return pStringClass; … … 697 689 { 698 690 // キャッシュしておく 699 pObjectClass = this->FindEx( NamespaceScopes( "System" ), "Object");691 pObjectClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "Object" ) ); 700 692 } 701 693 return pObjectClass; … … 706 698 { 707 699 // キャッシュしておく 708 pInterfaceInfo = this->FindEx( "ActiveBasic.Core.InterfaceInfo");700 pInterfaceInfo = this->FindEx( Symbol( NamespaceScopes( "ActiveBasic.Core" ), "InterfaceInfo" ) ); 709 701 } 710 702 return pInterfaceInfo;
Note:
See TracChangeset
for help on using the changeset viewer.