Replication
Revision as of 09:21, 25 August 2006 by Konradm (Talk | contribs) (→Basic cases of direct repeated inheritance)
Work in progress!
We start with some very basic examples, for this we consider all the classes not to be inherited by ANY.
Example set
Basic cases of direct repeated inheritance
The following set of example will base on class B:
class B feature f: INTEGER g do f := f + 1 end end
Lets have look at D1 that repeatedly inherits from B:
class D1 inherit {NONE} B rename f as f_1, g as g_1 end B rename f as f_2, g as g_2 end feature end
And an informal description of the semantics: An object of class D1 contains two physical attributes (f_1 and f_2). A call to feature g_1 results in f_1 being incremented and a call to g_2 increments f_2.