|Re: Multiple Inheritance [message #1148804 is a reply to message #1148625]
||Mon, 21 October 2013 19:08
|| Christian W. Damus
Registered: July 2009
As Ed already indicated, this is a UML question and should be asked on
the UML2 newsgroup (which I copy on this reply).
See some replies in-line, below.
On 2013-10-21 16:37:40 +0000, Mahin Abbasipour said:
> thank you very much for your reply.
> class DataRate is inheriting at the same time from classes Performance
> and NonfunctionalRequirement which are the extension of metaclass Class
> (base_Class: Class). UR is the name of defined UML profile. As far as I
> know, multiple inheritance is supported in UML2.
Stereotypes support multiple inheritance as any Class does, yes.
> Diagnosis of UR
> Processed inheritance of feature 'base_Class : Class' by class
> 'DataRate -> Performance, NonFunctionalRequirement' as a duplicate of
> feature 'base_Class : Class'.
This is quite expected. You have two stereotypes Performance and
NonfunctionalRequirement that both extend the Class metaclass, so of
course they both define a property named "base_Class". Now you have a
new stereotype DataRate that specializes both of these.
So, it inherits two distinct "base_Class" attributes. Which should be
used to actually apply this stereotype to a class? It is impossible
for the UML2 API to know. And the Ecore representation of the DataRate
stereotype isn't any happier.
However, I think the default behaviour of the UML-to-Ecore
transformation when you define your profile is to simply discard
duplicate attributes like this to resolve the conflict. The tool
notifies you when this happens, but I think the profile should actually
work. Does it not? Or are you just worried about this warning message?
Powered by FUDForum
. Page generated in 0.02905 seconds