Ignore:
Timestamp:
Aug 21, 2007, 11:00:25 PM (17 years ago)
Author:
dai_9181
Message:

ジェネリクスのベースを実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Class.h

    r282 r290  
    99
    1010class UserProc;
     11class CClass;
    1112
    1213class InheritedInterface
     
    4849    // importされている名前空間
    4950    NamespaceScopesCollection importedNamespaces;
    50    
     51
     52    // 型パラメータ
     53    GenericTypes formalGenericTypes;
     54
    5155    // 継承クラス
    5256    const CClass *pSuperClass;
     
    108112        , classType( Class )
    109113        , pSuperClass( NULL )
     114        , blittableType( Type() )
    110115        , isReady( false )
    111116        , fixedAlignment( 0 )
     
    124129        , classType()
    125130        , pSuperClass( NULL )
     131        , blittableType( Type() )
    126132        , isReady( false )
    127133        , fixedAlignment( 0 )
     
    173179    }
    174180
     181    // 型パラメータ
     182    void AddFormalGenericType( GenericType genericType )
     183    {
     184        this->formalGenericTypes.push_back( genericType );
     185    }
     186    bool IsExistFormalGenericTypeParameter( const std::string &name ) const
     187    {
     188        BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
     189        {
     190            if( genericType.GetName() == name )
     191            {
     192                return true;
     193            }
     194        }
     195        return false;
     196    }
     197
    175198    // 継承元クラス
    176199    bool HasSuperClass() const
Note: See TracChangeset for help on using the changeset viewer.