This site contains older material on Eiffel. For the main Eiffel page, see
http://www.eiffel.com
.
Table of Contents
25 Using inheritance well
25.1 HOW NOT TO USE INHERITANCE
25.2 WOULD YOU RATHER BUY OR INHERIT?
To have and to be
The rule of change
The polymorphism rule
Summary
25.3 AN APPLICATION: THE HANDLE TECHNIQUE
25.4 TAXOMANIA
25.5 USING INHERITANCE: A TAXONOMY OF TAXONOMY
Scope of the rules
Wrong uses
General taxonomy
Subtype inheritance
Restriction inheritance
Extension inheritance
A proper mathematical model
Variation inheritance
Uneffecting
Reification inheritance
Structure inheritance
Implementation inheritance
Facility inheritance
Using inheritance with deferred and effective classes
25.6 ONE MECHANISM, OR MORE?
25.7 SUBTYPE INHERITANCE AND DESCENDANT HIDING
Defining a subtype
Multiple views
Enforcing the subtype view
The need for descendant hiding
Avoiding descendant hiding
Using descendant hiding
Taxonomies and their limitations
Using descendant hiding
25.8 IMPLEMENTATION INHERITANCE
Arrayed stacks
The marriage of convenience
It feels so good, but is it wrong?
Doing without inheritance
25.9 FACILITY INHERITANCE
Using character codes
Iterators
Forms of facility inheritance
Understanding facility inheritance
25.10 MULTIPLE CRITERIA AND VIEW INHERITANCE
Classifying through multiple criteria
View inheritance
Is view inheritance appropriate?
Criteria for view inheritance
25.11 HOW INHERITANCE STRUCTURES ARE PRODUCED
Specialization and abstraction
Varieties of class abstraction
Client independence
Elevating the level of abstraction
25.12 A SUMMARY VIEW: USING INHERITANCE WELL
25.13 KEY CONCEPTS INTRODUCED IN THIS CHAPTER
25.14 BIBLIOGRAPHICAL NOTES
25.15 APPENDIX: A HISTORY OF TAXONOMY
EXERCISES
E25.1 Arrayed stacks
E25.2 Meta-taxonomy
E25.3 The stacks of Hanoi
E25.4 Functional variation inheritance
E25.5 Classification examples
E25.6 Where do iterators belong?
E25.7 Module and type inheritance
© 1985-2012 Eiffel Software. All rights reserved. --
Privacy Policy