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/Meta.cpp

    r562 r566  
    178178    throw;
    179179}
     180
     181const CClass *Meta::FindClassSupportedTypeDef( const NamespaceScopes &namespaceScopes, const std::string &name )
     182{
     183    const CClass *pClass = this->GetClasses().FindEx( namespaceScopes, name );
     184    if( pClass )
     185    {
     186        return pClass;
     187    }
     188
     189    // TypeDefも見る
     190    int index = this->GetTypeDefs().GetIndex( namespaceScopes, name );
     191    if( index != -1 ){
     192        Type type = this->GetTypeDefs()[index].GetBaseType();
     193        if( type.IsObject() ){
     194            return &type.GetClass();
     195        }
     196    }
     197
     198    return NULL;
     199}
     200const CClass *Meta::FindClassSupportedTypeDef( const std::string &fullName )
     201{
     202    char AreaName[VN_SIZE] = "";        //オブジェクト変数
     203    char NestName[VN_SIZE] = "";        //入れ子メンバ
     204    bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
     205
     206    return FindClassSupportedTypeDef( NamespaceScopes( AreaName ), NestName );
     207}
Note: See TracChangeset for help on using the changeset viewer.