Book a Demo

Author Topic: C++ typedefs  (Read 3425 times)

Coder

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
C++ typedefs
« on: March 01, 2006, 05:28:24 pm »
When EA reverse engineers the following code into a class diagram it would put two classes A and B without any association links
class A {};
typedef A AA[5];
class B
{
  AA a;
} ;
This is a quite typical example. It is unfortunate that apparent associations are automatically added to a class diagram. Is there a way to fix this?

EA 6.1.787, ANSI C++

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: C++ typedefs
« Reply #1 on: March 06, 2006, 01:42:46 pm »
No, I don't think anything can be done about reverse engineering this.  It is beyond that abilities of our C++ reverse engineering.

EA can generate that attribute from an association to A if you want though.  In order to do this you need to specify the default collection class of A to AA.  And create an association with a multiplicity > 1 from B to A.

See http://sparxsystems.com.au/EAUserGuide/index.html?settingcollectionclasses.htm for more information.