Book a Demo

Author Topic: Code engineering issue  (Read 4812 times)

doojoo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Code engineering issue
« on: April 03, 2008, 06:09:39 pm »
Hi.

I am generating C++ code from my class diagram. EA automatically generates the constructor and the virtual destructor.
I have swiched on the option "On forward synch, prompt to delete code features not in model" to make sure that when I change the type of an attribute, the type is correctly changed in the code (without the option both the old and the new signatures of the attribute appear in the code).

Now the following situation occurs:
1. I define a new class in my model. The class has no attributes and no methods.
2. I generate code for the new class. The code contains a constructor and a virtual destructor (as I expected).
3. Without making any changes I generate the code again. The 'Synchronize Class' dialog appears listing code features not in model. Listed are the constructor and the virtual destructor that were generated during the first pass. Considering the fact that EA just generated these method, thsi is not really desired.
4. I select all and set the Delete action. As a result both the constructor and destructor are deleted from the code.
5. Following code generate actions never re-insert the constructor and destructor into the code.

What settings / options must I use to make sure that,
on one hand attribute and method changes are correcty processed and
on the other hand the described constructor/destructor behaviour is prevented.

Best regards.