Book a Demo

Author Topic: Code generation for C++ and C++/CLI from one model  (Read 2757 times)

walx

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Code generation for C++ and C++/CLI from one model
« on: February 10, 2009, 06:48:32 pm »
Hello,

my SW consists of two parts. One part is written in native C++, the other part in C++/CLI for .NET. Both parts are modeled as two packages in one EA model. So I have to generate source code from my EA model for C++ and for C++/CLI.

I found the option "C++ Version" in Tools->Options->Source Code Engineering->C++. There I can specify "the set of templates to be used when generating all C++ code for the model". This option works for all classes of the model.

I would like to specify the set of templates for "C++ Version" per class (or at least per package).

Does somebody has a solution for EA 7.1? Or have I to wait for this feature in a new EA version?

Thanks!

WalX
Best regards
Walter

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Code generation for C++ and C++/CLI from one m
« Reply #1 on: February 11, 2009, 07:57:35 am »
Hi walx,

You could try to use user defined stereotypes for your C++/CLI classes, and override code generation for those stereotypes.

HTH
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code generation for C++ and C++/CLI from one m
« Reply #2 on: February 11, 2009, 08:32:43 am »
The templates between the different versions are mostly the same, and you should be able to just use the C++/CLI templates, as it does use stereotypes as Günther suggested you try.