#include "stdafx.h" Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters ) : DynamicMethodsPrototype() , pInterfaceClass( pInterfaceClass ) , vtblOffset( -1 ) , actualTypeParameters( actualTypeParameters ) { //メソッドをコピー BOOST_FOREACH( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() ) { CMethod *pMethod = new DynamicMethod( *pBaseMethod ); // アクセシビリティ if(pBaseMethod->GetAccessibility() == Prototype::Private){ pMethod->SetAccessibility( Prototype::None ); } else{ pMethod->SetAccessibility( pBaseMethod->GetAccessibility() ); } //pobj_Inherits // ※継承元のClassIndexをセット(入れ子継承を考慮する) if(pBaseMethod->GetInheritsClassPtr()==0){ pMethod->SetInheritsClassPtr( pInterfaceClass ); } else{ pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() ); } AddDynamicMethods( pMethod ); } } std::string Interface::GetFullNameWithActualGenericTypeParameters() const { std::string interfaceName = this->GetClass().GetFullName(); if( actualTypeParameters.size() ) { std::string actualGenericTypesName; BOOST_FOREACH( const Type &typeParameter, actualTypeParameters ) { if( actualGenericTypesName.size() ) { actualGenericTypesName += ","; } actualGenericTypesName += typeParameter.ToString(); } interfaceName += "<" + actualGenericTypesName + ">"; } return interfaceName; }