Author Topic: Accessors for association attributes  (Read 1370 times)


  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Accessors for association attributes
« on: January 30, 2002, 07:12:04 am »
Can the EA tool be modified such that the C++ code generator can be configured to provide accessor methods for class associations, i.e. Set and Get methods to the class pointer used to represent an association.

In addition, when the association represents a one-to-many relationship, the C++ generated still only contains a single class pointer. I would have expected an array, or perhaps some sort of container class. Can EA not contain the relationships within an array, for example. The Get and Set methods could then be auto-generated with a parameter to represent the association number. Other UML tools manage to generate code for one-to-many relationships in this way.

The Options menu for attributes has a tick-box for "Generate Get/Set methods for associated attributes". Perhaps this is meant to be used for the above. However, it does not seem to impact the generated code at all.