[Uml-devel] Re: [Uml-user] aggregation / composition

Andrew Sutton ansutton at kent.edu
Fri Sep 20 06:53:04 UTC 2002


On Friday 20 September 2002 09:31 am, Jonathan Riddell wrote:
> > > I've removed the restrictions on composition and aggregation.  Are the
> > > restrictions on implementation/realisation correct?
> > >   //one connected to widget only (a or b)
> >
> > just remember that on composition/aggregation relationships, you
> > shouldn't be able to specify navigability. most of the other tools get
> > this wrong.  c/a defines navigability from the container to the
> > containee. containee's don't know about the container. if they do,
> > it's another type of relationship.
>
> Do you mean that navigability is impled rather than not specified at all?

right. i think. lets see... the aggregate association is navigable from the 
aggregator to the aggregatee - but not the other way around. it's just a 
property of the relationship that one way navigability is implied. consider 
my simple diagram:

Foo <>---- Bar

if you break it down to source you'd end up with something like:

class Foo
{
	Bar **bars;
};

class Bar {};

hopefully, the code generator would create a better aggregation than that, but 
hey! i'm not the code generator :)

anyway, almost every tool out there allows you to specify navigability on 
aggregation/composition associations, but it really doesn't make any sense 
to.

andy




More information about the umbrello-devel mailing list