Changeset 513 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
- Timestamp:
- Apr 30, 2008, 8:38:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
r511 r513 14 14 using namespace ActiveBasic::Compiler; 15 15 16 17 Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters )18 : DynamicMethodsPrototype()19 , pInterfaceClass( pInterfaceClass )20 , vtblOffset( -1 )21 , actualTypeParameters( actualTypeParameters )22 {23 //メソッドをコピー24 BOOST_FOREACH( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() )25 {26 CMethod *pMethod = new DynamicMethod( *pBaseMethod );27 28 // アクセシビリティ29 if(pBaseMethod->GetAccessibility() == Prototype::Private){30 pMethod->SetAccessibility( Prototype::None );31 }32 else{33 pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );34 }35 36 //pobj_Inherits37 // ※継承元のClassIndexをセット(入れ子継承を考慮する)38 if(pBaseMethod->GetInheritsClassPtr()==0){39 pMethod->SetInheritsClassPtr( pInterfaceClass );40 }41 else{42 pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );43 }44 45 AddDynamicMethods( pMethod );46 }47 }48 49 std::string Interface::GetFullNameWithActualGenericTypeParameters() const50 {51 std::string interfaceName = this->GetClass().GetFullName();52 if( actualTypeParameters.size() )53 {54 std::string actualGenericTypesName;55 BOOST_FOREACH( const Type &typeParameter, actualTypeParameters )56 {57 if( actualGenericTypesName.size() )58 {59 actualGenericTypesName += ",";60 }61 actualGenericTypesName += typeParameter.ToString();62 }63 64 interfaceName += "<" + actualGenericTypesName + ">";65 }66 return interfaceName;67 }68 16 69 17 bool CClass::IsClass() const
Note:
See TracChangeset
for help on using the changeset viewer.