[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: The definitive truth about multiple inheritance

Ed,

I will try to decrease your headache ...
I keep reading this and it's making my brain hurt. Maybe you could draw a picture or make explicit what methods you're talking about. Is D inheriting from C or is it A that's doing that, or is the comma implying that C inherits from Class but is otherwise unrelated?
You are right : my explanation is more complex than what I want to describe.
So :
- A inherits from Action
- C inherits from Class
- D inherits from both A and C
So simple when it is clear !

The generated code :
- the class DImpl extends the class AImpl : it is OK.
- the class DImpl implements the interface D ; the interface D extends the interface A and the interface C.
- the class DImpl inherits methods from AImpl : so it implements the interface A;
- the class DImpl contains methods that are declared in the interface C ;
- BUT DImpl does not contain methods that are inherited by the interface C from the interface Class.
So, the class DImpl should be declared abstract, because it does not implements the methods inherited by the interface C that it should implement.


The point that is that if you consider the super types Y and Z of an EClass X, XImpl will extend YImpl and will generate a clone of what's in ZImpl. So it should indeed be possible to generate a complete implementation.
It is exactly what I expect. Instead, I get a partial implementation.

What can I do to solve my problem ?
Are you saying that's generated doesn't compile?
Yes, it does not compile, because the class lacks some methods, those from the class Class inherited by the interface C.

Do you see what is my problem now ?
And do you see a solution ... ?

Guillaume Vauvert
http://www.ixmas.org