Ignore:
Timestamp:
Jun 14, 2008, 12:16:27 PM (16 years ago)
Author:
dai_9181
Message:

静的リンクリンカの依存関係解決モジュールを製作中

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp

    r639 r640  
    3333}
    3434
     35bool Interface::Equals( const Interface *pInterface ) const
     36{
     37    // ポインタが等しいかどうかを見てみる
     38    if( this == pInterface )
     39    {
     40        return true;
     41    }
     42    else if( this->pInterfaceClass->IsNeedResolve() || pInterface->pInterfaceClass->IsNeedResolve() )
     43    {
     44        // 依存関係解決前の状態であれば、パスが等しいかどうかを見てみる
     45        if( this-pInterfaceClass->IsDuplication( pInterface->pInterfaceClass ) )
     46        {
     47            return true;
     48        }
     49    }
     50    return false;
     51}
     52
    3553std::string Interface::GetFullNameWithActualGenericTypeParameters() const
    3654{
     
    5371}
    5472
    55 bool Interface::Resolve( const ObjectModule &resolver )
     73bool Interface::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
    5674{
    5775    // 動的メソッド
    5876    BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() )
    5977    {
    60         pMethod->Resolve( resolver );
     78        pMethod->Resolve( resolver, resolveErrors );
    6179    }
    6280
     
    6684        if( this->pInterfaceClass->IsNeedResolve() )
    6785        {
    68             this->pInterfaceClass = resolver.meta.GetClasses().FindLike( pInterfaceClass );
     86            const CClass *pTempClass = resolver.meta.GetClasses().FindLike( this->pInterfaceClass );
     87            if( pTempClass )
     88            {
     89                this->pInterfaceClass = pTempClass;
     90            }
     91            else
     92            {
     93                resolveErrors.Add( ResolveError( this->pInterfaceClass->GetRelationalObjectModuleIndex(), this->pInterfaceClass->GetFullName() ) );
     94            }
    6995        }
    7096    }
     
    7298    BOOST_FOREACH( Type &actualTypeParameter, actualTypeParameters )
    7399    {
    74         actualTypeParameter.Resolve( resolver );
     100        actualTypeParameter.Resolve( resolver, resolveErrors );
    75101    }
    76102
Note: See TracChangeset for help on using the changeset viewer.