Book a Demo

Author Topic: code generation generates to much code.  (Read 5202 times)

Daimonion

  • EA Novice
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
code generation generates to much code.
« on: May 11, 2016, 06:22:23 pm »
Hi

i'm working with the code generation in my actual embedded C project and so far it works very well.
But for one case it does generate just to much code.

Let's draw an scenario. I have an interface class with 5 operations in it. This operations are all marked as extern. Now i'm generate a class which realizes the interface and in the override/implementation dialog (Strg + Shift + O) i say that the class realizes 2 from 5 Operations. Now i have another class which also implements the interface and realizes the other 3 classes. In EA Diagram view the operations show up correctly in the two classes (One with 2 Operations and one with 3 Operations) On generating Code from this model the interface generates perfect as .h header file. Both classes generates also header files which is not necessary for this easy model but it's okay. Furthermore it generates .c files. But both generated files for the classes (for each class a .h and a .c file) implement all interface operations although one should only implement 2 and the other one should implement 3 operations.

Do i make something wrong or do i need to do additional settings?


Attached a link to a zip file with a sample ea project and the generated code.

https://drive.google.com/file/d/0B2tyGwXANo4NNVlrNVpZaVBSU0E/view?usp=sharing

Regards
Daimonion