Book a Demo

Author Topic: Composite link when importing C++ Code  (Read 2207 times)

Physicus

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Composite link when importing C++ Code
« on: February 06, 2006, 06:20:17 am »
Hi all,

when C++ code is imported into EA via "import source directory..." then all member variables of a class which refer to an other class appear as association links in the diagram. It seems, that EA doesn't consider in which way the class is refered, i.o.w. it does not create composite or aggregation links (even not in the obvious cases). Of course I can later turn the association links into composite or aggregation links, but it would be nice when EA would consider this by its own. Did I overlook something (perhaps it is configurable anywhere)?

Best regards.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Composite link when importing C++ Code
« Reply #1 on: February 06, 2006, 01:13:05 pm »
The reason for this is that EA only looks at the actual declaration for each attribute.  As a result it can't determine if the link is a composition or aggregation.

Physicus

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Composite link when importing C++ Code
« Reply #2 on: February 06, 2006, 01:24:47 pm »
Well, but in the case of classA having a member variable of type classB (not a reference/pointer; - really a direct creation of this object of classB as a member within classA) it is clear, that this object (of classB) will be destroyed, when the instance of classA executes its destructor. Therefore it must be a composite link. This is clear only from looking at the declarations!