Book a Demo

Author Topic: c++ interface always generates a c'tor  (Read 3040 times)

cliint3112

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
c++ interface always generates a c'tor
« on: November 16, 2012, 07:03:57 pm »
Hello,

i have an interface foo, specified with pure virtual functions and stereotype <<interface>>. Code generation still generates a constructor for that class.

Greetings,
clint3112

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: c++ interface always generates a c'tor
« Reply #1 on: November 16, 2012, 08:20:52 pm »
I had to explicitly fix that in the code generation templates.
Didn't find any other way either.

In CG template 'Class Body' inserted at line 10:
Code: [Select]
%if classStereotype != "interface" and elemType != "Interface"%

And closed that block after all the constructor generation stuff with %endIf%

HTH
Günther