Book a Demo

Author Topic: No Inheritance from c++ interfaces  (Read 3506 times)

cliint3112

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
No Inheritance from c++ interfaces
« on: November 16, 2012, 07:01:58 pm »
Hello,

I have a pure virtual abstract interface foo and a class bar, thar inherits the interface. After Codegeneration, class bar does not have the methods of foo.
Have selected stereotype <<interface>> for foo and checked 'Generate methods for implemented interfaces' in Attribute Options

Greetings,
clint3112

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: No Inheritance from c++ interfaces
« Reply #1 on: November 16, 2012, 07:14:12 pm »
Clint,

Are you sure that selecting <<interface>> stereotype is the correct way of working?
I think an Interface is not the same as a Class with stereotype <<interface>>. But I could be wrong of course.

Geert

cliint3112

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: No Inheritance from c++ interfaces
« Reply #2 on: November 16, 2012, 07:23:14 pm »
Hi Geert,

never went to a training in EA but when you look at the stereotype enumeration, it's correct for an enum. So why shouldn't be interface the wrong stereotype for interfaces?

greetings,
clint3112

cliint3112

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: No Inheritance from c++ interfaces
« Reply #3 on: November 16, 2012, 07:26:26 pm »
Okay, my fault. Choose class with stereotype interface and not interface with stereotype interface  ::)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: No Inheritance from c++ interfaces
« Reply #4 on: November 16, 2012, 07:27:34 pm »
Interface and Class are different metaclasses in UML (and EA).
So there's a difference between creating a Class with stereotype <<interface>> and creating an actual Interface.

The enumeration issue has been addresses in the current EA version 10 (beta). They are now two different metatypes as well (although EA keeps some backward compatibility for the stereotype <<enumeration>>.

Just try it with an actual interface and see if that works better.

Geert