| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.11.1 Administration Functions 2.11.2 Error Handling 2.11.3 Object Comparisons 2.11.4 Cloning Objects 2.11.5 Write and Display
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes administrative, non-technical GOOPS functions.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The procedure goops-error is called to raise an appropriate error
by the default methods of the following generic functions:
slot-missing (see section slot-missing)
slot-unbound (see section slot-unbound)
no-method (see section no-method)
no-applicable-method (see section no-applicable-method)
no-next-method (see section no-next-method)
If you customize these functions for particular classes or metaclasses,
you may still want to use goops-error to signal any error
conditions that you detect.
goops-error and error message constructed
from format-string and args. Error message formatting is
as done by scm-error.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The default methods always return #f. Application class authors
may wish to define specialized methods for object-eqv? and
object-equal? that compare instances of the same class for
equality in whatever sense is useful to the application.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
instance?), it is cloned by calling deep-clone
on that value. Other slot values are copied either as immediate values
or by reference.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
write and display become generic
functions with special methods for printing
<object>
<foreign-object>
<class>
<generic>
<method>.
write and display print non-GOOPS values in the same way
as the Guile primitive write and display functions.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For an introduction to metaobjects and the metaobject protocol, see 2.1.1 Metaobjects and the Metaobject Protocol.
The aim of the MOP specification in this chapter is to specify all the customizable generic function invocations that can be made by the standard GOOPS syntax, procedures and methods, and to explain the protocol for customizing such invocations.
A generic function invocation is customizable if the types of the arguments to which it is applied are not all determined by the lexical context in which the invocation appears. For example,
(initialize instance initargs) invocation in the
default make-instance method is customizable, because the type of the
instance argument is determined by the class that was passed to
make-instance.
(make <generic> #:name ',name) invocation in define-generic
is not customizable, because all of its arguments have lexically determined
types.
When using this rule to decide whether a given generic function invocation is customizable, we ignore arguments that are expected to be handled in method definitions as a single "rest" list argument.
For each customizable generic function invocation, the invocation protocol is explained by specifying
3.1 Class Definition 3.2 Instance Creation 3.3 Class Redefinition 3.4 Method Definition 3.5 Generic Function Invocation
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |