[Uml-devel] ambiguity
Luis De la Parra Blum
lparrab at gmx.net
Wed Jan 22 15:34:03 UTC 2003
On Wednesday 15 January 2003 19:14, Andrew Sutton wrote:
> hey, does anybody know anything about disambiguating the "OO circle of
> death" inheritance problem? as i go thru the MOF implementation i'm finding
> a couple of instances of multiple inheritance that make the inheritance
> tree cyclic. for example (this isn't quite right, but its enough to
> illustrate the point):
>
> class ModelElement;
> class TypedElement : public ModelElement;
> class DataType : public ModelElement;
> class AliasType : public DataType, public TypedElement;
>
> if you can imagine a UML diagram of this, you'd end up with a cyclic graph
> - the dreaded circle of death?
hmm....I dont see any circular references there...
AliasType inherits ModelElement twice, but that's not a "circle of death"
Your cicle of death would occur if ModelElement would inherit from AliasType,
which is NOT possible (UML specs prevent this)
so your problem is "only" that an AliasType object has two ModelElements..
In C++ you can use virtual inheritance and you are saved (but dont ask me how
to represent this in strict UML) =)
luis
More information about the umbrello-devel
mailing list