Book a Demo

Author Topic: generate only .h without .cpp  (Read 3395 times)

jostmi

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
generate only .h without .cpp
« on: November 06, 2007, 11:50:32 pm »
Hello

I have a problem with the code generation (C++):
I want to generate only a .h File, without the .cpp File.
And I want to set this option in every class individually.
Is that possible in Enterprise Architect?

Thanks for helping me
Michael
« Last Edit: November 06, 2007, 11:50:54 pm by jostmi »

AndiA

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: generate only .h without .cpp
« Reply #1 on: November 14, 2007, 03:35:33 am »
Hi,

i would create a tagged value for those classes like
tag: "headeronly"
value: "true"

and then add this code at the beginning of the "Class Impl" and/or "File Impl" code genaration template
(Settings | Code Generation Templates):
Code: [Select]
%if classTag:"headeronly" == "true"%
%endTemplate%


jostmi

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: generate only .h without .cpp
« Reply #2 on: November 14, 2007, 07:06:23 am »
Thanks for your reply,

but when I insert this if-clause in the "File Impl" Enterprise Architect generate an empty .cpp File, but I want no .cpp File...

You have a other solution, hopefully
Michael