| www.delorie.com/gnu/docs/guile/goops_30.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
define-generic calls ensure-generic to upgrade a
pre-existing procedure value, or make with metaclass
<generic> to create a new generic function.
define-accessor calls ensure-accessor to upgrade a
pre-existing procedure value, or make-accessor to create a new
accessor.
#f.
If old-definition is already a generic function, it is returned unchanged.
If old-definition is a Scheme procedure or procedure-with-setter,
ensure-generic returns a new generic function that uses
old-definition for its default procedure and setter.
Otherwise ensure-generic returns a new generic function with no
defaults and no methods.
(car name). If
unspecified, name defaults to #f.
ensure-generic calls make with metaclasses
<generic> and <generic-with-setter>, depending on the
previous value of the variable that it is trying to upgrade.
make-generic is a simple wrapper for make with metaclass
<generic>.
#f.
If proc is already an accessor, it is returned unchanged.
If proc is a Scheme procedure, procedure-with-setter or generic
function, ensure-accessor returns an accessor that reuses the
reusable elements of proc.
Otherwise ensure-accessor returns a new accessor with no defaults
and no methods.
(car name). If
unspecified, name defaults to #f.
ensure-accessor calls make with
metaclass <generic-with-setter>, as well as calls to
ensure-generic, make-accessor and (tail recursively)
ensure-accessor.
make-accessor calls make twice, first
with metaclass <generic> to create a generic function for the
setter, then with metaclass <generic-with-setter> to create the
accessor, passing the setter generic function as the value of the
#:setter keyword.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |