Book a Demo

Author Topic: adding macro and structures  to a class  (Read 3185 times)

naifusc

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
adding macro and structures  to a class
« on: June 24, 2013, 03:52:35 am »
Hi

i am new to EA.

I am trying to add a macro and a structures to a class but i can not find a way to do it without opening the source code and writing there.

is there a better and easier way to do it ?  

if i write the macro in the source code and sync the code with the model, the macro will disappear. and i will have to go back and write again. for the structure when i sync, it will not disappear and it will show in the project browser under the class but it will not show in the class as an attribute in the graphical view.

does anyone know how to fix this problem? thanks in advance

Naif


g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: adding macro and structures  to a class
« Reply #1 on: June 24, 2013, 05:25:58 pm »
I'm guessing you're asking for C programming language. You could handle such stuff defining a specialized UML profile for C with stereotypes for C specific language elements (as far these can be mapped to suitable UML elements), and changes to the C code generation templates alongside. I have once started a paper for this, and can give you the draft if you want (send me a PM with your eMail address).

To see your struct definitions within the actual class is OK and what should be expected. The problem comes with the widely used typedef struct syntax in C, that needs some special handling.

Best regards,
Günther
« Last Edit: June 24, 2013, 05:26:50 pm by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/