Ignore:
Timestamp:
May 6, 2008, 1:41:03 PM (16 years ago)
Author:
dai_9181
Message:

・Classes::Find→Classes::FindExにリネームして、TypeDefサポートを排除した。
・Meta::FindClassSupportedTypeDefメソッドを実装。従来のClasses::Findの実装内容を受け継ぐ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp

    r565 r566  
    648648}
    649649
    650 const CClass *Classes::Find( const NamespaceScopes &namespaceScopes, const std::string &name ) const
    651 {
    652     if( namespaceScopes.size() == 0 && name == "Object" ){
     650const CClass *Classes::FindEx( const NamespaceScopes &namespaceScopes, const std::string &name ) const
     651{
     652    if( namespaceScopes.size() == 0 && name == "Object" )
     653    {
    653654        return GetObjectClassPtr();
    654655    }
    655     else if( namespaceScopes.size() == 0 && name == "String" ){
     656    else if( namespaceScopes.size() == 0 && name == "String" )
     657    {
    656658        return GetStringClassPtr();
    657659    }
     
    683685    }
    684686
    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 
    694687    return NULL;
    695688}
    696 const CClass *Classes::Find( const std::string &fullName ) const
     689const CClass *Classes::FindEx( const std::string &fullName ) const
    697690{
    698691    char AreaName[VN_SIZE] = "";        //オブジェクト変数
     
    700693    bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
    701694
    702     return Find( NamespaceScopes( AreaName ), NestName );
     695    return FindEx( NamespaceScopes( AreaName ), NestName );
    703696}
    704697
     
    707700    if( !pStringClass ){
    708701        // キャッシュしておく
    709         pStringClass = this->Find( NamespaceScopes( "System" ), "String" );
     702        pStringClass = this->FindEx( NamespaceScopes( "System" ), "String" );
    710703
    711704        if( !pStringClass )
     
    723716    if( !pObjectClass ){
    724717        // キャッシュしておく
    725         pObjectClass = this->Find( NamespaceScopes( "System" ), "Object" );
     718        pObjectClass = this->FindEx( NamespaceScopes( "System" ), "Object" );
    726719
    727720        if( !pObjectClass )
     
    739732    if( !pInterfaceInfo ){
    740733        // キャッシュしておく
    741         pInterfaceInfo = this->Find( "ActiveBasic.Core.InterfaceInfo" );
     734        pInterfaceInfo = this->FindEx( "ActiveBasic.Core.InterfaceInfo" );
    742735
    743736        if( !pInterfaceInfo )
Note: See TracChangeset for help on using the changeset viewer.