Book a Demo

Author Topic: Code generation for associations  (Read 5091 times)

doojoo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Code generation for associations
« on: April 03, 2008, 08:30:51 pm »
Hi.

I'm new to EA and code generation and want to generate C++ code from my model.
The attribute that is generated to implement an association depends on the specification of the target role of the association.
When specifying the reference type containment the generated code contains a variable of type pointer to the target class. When specifying the value type containment the generated code contains a variable of type of the target class.
The specified multiplicity is not used in generating code. Even more trouble causes that fact that when I manually change the attribute to an array of pointers (becaue of multiplicity 10) and then re-generate the code, my manually changed attribute is changed back to being a pointer to the target class again.
How can I generate better code from my model, so no manual changes are required and no re-generation issues arise.

Best regards.