Ignore:
Timestamp:
Aug 23, 2007, 6:17:00 PM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

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

    r293 r299  
    5656    const CClass *pSuperClass;
    5757
     58    // 継承クラスの型パラメータ(実パラメータ)
     59    Types superClassActualTypeParameters;
     60
    5861    // Blittable型情報
    5962    Type blittableType;
     
    9396        ar & BOOST_SERIALIZATION_NVP( formalGenericTypes );
    9497        ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
     98        ar & BOOST_SERIALIZATION_NVP( superClassActualTypeParameters );
    9599        ar & BOOST_SERIALIZATION_NVP( blittableType );
    96100        //ar & BOOST_SERIALIZATION_NVP( interfaces );
     
    185189        this->formalGenericTypes.push_back( genericType );
    186190    }
     191    int GetFormalGenericTypeParameterIndex( const std::string &name ) const
     192    {
     193        int i = 0;
     194        BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
     195        {
     196            if( genericType.GetName() == name )
     197            {
     198                return i;
     199            }
     200            i++;
     201        }
     202        return -1;
     203    }
    187204    bool IsExistFormalGenericTypeParameter( const std::string &name ) const
    188205    {
     
    210227        this->pSuperClass = pSuperClass;
    211228    }
     229    const Types &GetSuperClassActualTypeParameters() const
     230    {
     231        return superClassActualTypeParameters;
     232    }
     233    void SetSuperClassActualTypeParameters( const Types &actualTypeParameters )
     234    {
     235        this->superClassActualTypeParameters = actualTypeParameters;
     236    }
    212237
    213238    // Blittable型
     
    270295    //継承させる
    271296    bool Inherits( const char *inheritNames, int nowLine );
    272     bool InheritsClass( const CClass &inheritsClass, int nowLine );
     297    bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine );
    273298    bool InheritsInterface( const CClass &inheritsClass, int nowLine );
    274299
Note: See TracChangeset for help on using the changeset viewer.