Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: walx on February 10, 2009, 06:48:32 pm

Title: Code generation for C++ and C++/CLI from one model
Post by: walx 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
Title: Re: Code generation for C++ and C++/CLI from one m
Post by: g.makulik 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
Title: Re: Code generation for C++ and C++/CLI from one m
Post by: Eve 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.