www.delorie.com/gnu/docs/guile/goops_12.html   search  
 
Buy GNU books!


Goops Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.2.2 Class Precedence List

The class precedence list of a class is the list of all direct and indirect superclasses of that class, including the class itself.

In the absence of multiple inheritance, the class precedence list is ordered straightforwardly, beginning with the class itself and ending with <top>.

For example, given this inheritance hierarchy:

 
(define-class <invertebrate> (<object>) ...)
(define-class <echinoderm> (<invertebrate>) ...)
(define-class <starfish> (<echinoderm>) ...)

the class precedence list of <starfish> would be

 
(<starfish> <echinoderm> <invertebrate> <object> <top>)

With multiple inheritance, the algorithm is a little more complicated. A full description is provided by the GOOPS Tutorial: see 5.4.4 Class precedence list.

"Class precedence list" is often abbreviated, in documentation and Scheme variable names, to cpl.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003