Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Martyn Pike on November 12, 2009, 08:24:51 am

Title: C++ code generation
Post by: Martyn Pike on November 12, 2009, 08:24:51 am
Hi.
I've been experimenting with generating C++ from EA.  It's going quite well but something is bugging me.  It's all the stereotypes that I have to filter out and why I cannot just have the C++ stereotypes in my system.

How do I turn of all the SPEM and Archimate ones and just have the ones from the C++ conventions ?  In fact - where are the stereotypes and tagged value from the C++ conventions.

thanks, emconuk
Title: Re: C++ code generation
Post by: Makulik on November 12, 2009, 09:45:34 pm
Hi Martyn,

I'm not sure I understood your question properly. What do you mean with 'C++ stereotypes'? As long there are no customized code generation templates for particular stereotypes, the standard templates don't really do special handling related to stereotypes AFAIK. I also don't know any C++ specific stereotypes, can you give a sample what you mean?
I'm not familiar with SPEM or Archimate modeling processes, but if you have s.th. that manifests as a PIM (platform independent model), the model transformation should handle to place the platform dependent output in separate packages, and only those should be used to generate code.
If its s.th. else, you could simply exclude elements from code generation by setting their 'Language' properties to <none>.

HTH
Günther
Title: Re: C++ code generation
Post by: KP on November 13, 2009, 08:35:48 am
Quote
How do I turn of all the SPEM and Archimate ones
Settings > MDG Technologies, clear checkboxes by the technologies that you aren't interested in and restart EA.
Title: Re: C++ code generation
Post by: Martyn Pike on November 13, 2009, 09:26:54 am
I've managed turn those off now. thanks.

In answer to the previous reply. If I look at the C++ conventions then it mentions a sterotype called union but I cannot seem to find it anywhere to apply it to my class.  I am finding the same thing with the tagged values for example initializer.