| www.delorie.com/gnu/docs/guile/goops_18.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Implementation notes: define-class expands to an expression which
class to create the new class (see section class)
class-redefinition
(see section 3.8 Redefining a Class).
Implementation notes: class expands to an expression which
#:init-form option to an
#:init-thunk option, to supply a default environment parameter
(the current top-level environment) and to evaluate all the bits that
need to be evaluated
make-class to create the class with the processed and
evaluated parameters.
make-class,
slots and options are separate list parameters: slots
here is a list of slot definitions.
Implementation notes: make-class
<object> to the supers list if supers is empty
or if none of the classes in supers have <object> in their
class precedence list
#:environment, #:name and #:metaclass
options, if they are not specified by options, to the current
top-level environment, the unbound value, and (ensure-metaclass
supers) respectively (see section ensure-metaclass)
make, passing the metaclass as the first parameter and all
other parameters as option keywords with values.
In the simplest case, where all the supers are straightforward
classes with metaclass <class>, the returned metaclass is just
<class>.
For a more complex example, suppose that supers contained one
class with metaclass <operator-class> and one with metaclass
<foreign-object-class>. Then the returned metaclass would be a
class that inherits from both <operator-class> and
<foreign-object-class>.
If supers is the empty list, ensure-metaclass returns the
default GOOPS metaclass <class>.
GOOPS keeps a list of the metaclasses created by
ensure-metaclass, so that each required type of metaclass only
has to be created once.
The env parameter is ignored.
ensure-metaclass-with-supers is an internal procedure used by
ensure-metaclass (see section ensure-metaclass). It returns a metaclass that is the union by
inheritance of the metaclasses in meta-supers.
The internals of make, which is ultimately used to create the new
class object, are described in 3.3.2 Customizing Instance Creation,
which covers the creation and initialization of instances in general.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |