Book a Demo

Author Topic: Importing c++: no assocs from pointer member vars?  (Read 2990 times)

Gus

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Importing c++: no assocs from pointer member vars?
« on: June 15, 2006, 03:45:29 am »
Hi all,

I'm evaluating Enterprise Architect (6.1.791) and I've hit a bit of a problem importing existing c++ code. Any help would be much appreciated.

If I import b.h and a.h:

class b
}
};

class a
{
 b m_b;
};

.....I see what I would expect on the class diagram, ie an association between a and b, with the target role set to m_b. However, if I change a.h to:

class a
{
 b* m_pb;
};

.....and import the code again I don't get the association drawn any more.

In other words, pointer member variables don't generate associations. Should they? Can they?

Thanks,

Gus

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Importing c++: no assocs from pointer member v
« Reply #1 on: June 15, 2006, 07:01:36 am »
Gus,

Just to be clear what you're asserting...

The first example should be an Association by value and the second an Association by reference, correct?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Gus

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Importing c++: no assocs from pointer member v
« Reply #2 on: June 15, 2006, 07:08:48 am »
Hi Paolo,

I'm new to UML but yes, I believe that's correct.

Gus

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Importing c++: no assocs from pointer member v
« Reply #3 on: June 18, 2006, 03:15:26 pm »
Hello Gus,

EA reverse engineering currently only creates associations when the attribute type exactly matches the class name.  Because that attribute is a pointer, the pointer is included in the type and no association is created.

SF_lt

  • EA User
  • **
  • Posts: 216
  • Karma: +1/-0
  • The Truth Is Out There
    • View Profile
Re: Importing c++: no assocs from pointer member v
« Reply #4 on: June 28, 2006, 10:56:14 am »
Quote
EA reverse engineering currently only creates associations when the attribute type exactly matches the class name.  Because that attribute is a pointer, the pointer is included in the type and no association is created.


That's bad
registertm everything to SparX