Book a Demo

Author Topic: C++ : Association vs. Aggregation Logic?  (Read 3638 times)

jeffSpr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
C++ : Association vs. Aggregation Logic?
« on: June 13, 2003, 11:49:40 am »
How does EA reverse engineer code to come up with associations vs. aggregation?

I can understand that a pointer to some object would come up as an association in the class diagram.  But shouldn't an array of objects be considered aggregation (either weak or strong)?

Has anyone figured out how EA decides between Association vs. Aggregation relationships when importing source?  Anyone else having this problem?

p.s. I saw that build 615 fixes something to do with with array declarations for member variables - but I only have build 614 for the eval version.


jeffSpr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: C++ : Association vs. Aggregation Logic?
« Reply #1 on: June 19, 2003, 06:23:31 am »
I got the following reply via email from Geoffrey Sparks:

At the moment EA does not assume aggregation when reverse engineering - only association.  Arrays or collections in themselves do not indicate a whole-part relationship ... for example, a person may have a collection of Pets, but the Pets collection when reverse engineered would be an association - not a composition. On the other side - a Car may have a single SteeringWheel - which is a composition relationship.

So the rules are a little difficult to implement. I suspect in a future release it may be apprpriate to offer an option to reverse engineer collections etc. in a different way.