Ignore:
Timestamp:
May 10, 2008, 8:16:16 PM (16 years ago)
Author:
dai_9181
Message:

SplitMemberNameの依存関係を排除。

File:
1 edited

Legend:

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

    r597 r598  
    635635}
    636636
    637 const CClass *Classes::FindEx( const NamespaceScopes &namespaceScopes, const std::string &name ) const
    638 {
    639     if( namespaceScopes.size() == 0 && name == "Object" )
     637const CClass *Classes::FindEx( const Symbol &symbol ) const
     638{
     639    if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "Object" )
    640640    {
    641641        return GetObjectClassPtr();
    642642    }
    643     else if( namespaceScopes.size() == 0 && name == "String" )
     643    else if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "String" )
    644644    {
    645645        return GetStringClassPtr();
     
    647647
    648648    std::vector<const CClass *> classes;
    649     const CClass *pClass = GetHashArrayElement( name.c_str() );
     649    const CClass *pClass = GetHashArrayElement( symbol.GetName().c_str() );
    650650    while( pClass )
    651651    {
    652         if( pClass->IsEqualSymbol( namespaceScopes, name ) ){
     652        if( pClass->IsEqualSymbol( symbol.GetNamespaceScopes(), symbol.GetName() ) ){
    653653            //名前空間とクラス名が一致した
    654654            classes.push_back( pClass );
     
    674674    return NULL;
    675675}
    676 const CClass *Classes::FindEx( const std::string &fullName ) const
    677 {
    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 }
    684676
    685677const CClass *Classes::GetStringClassPtr() const
     
    688680    {
    689681        // キャッシュしておく
    690         pStringClass = this->FindEx( NamespaceScopes( "System" ), "String" );
     682        pStringClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "String" ) );
    691683    }
    692684    return pStringClass;
     
    697689    {
    698690        // キャッシュしておく
    699         pObjectClass = this->FindEx( NamespaceScopes( "System" ), "Object" );
     691        pObjectClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "Object" ) );
    700692    }
    701693    return pObjectClass;
     
    706698    {
    707699        // キャッシュしておく
    708         pInterfaceInfo = this->FindEx( "ActiveBasic.Core.InterfaceInfo" );
     700        pInterfaceInfo = this->FindEx( Symbol( NamespaceScopes( "ActiveBasic.Core" ), "InterfaceInfo" ) );
    709701    }
    710702    return pInterfaceInfo;
Note: See TracChangeset for help on using the changeset viewer.