print-instance-slots | | instance stream | [Generic Function]
|
Purpose
Extend standard-gbbopen-instance printing performed by
print-object
to include additional slot-value
information.
Method signatures
print-instance-slots | |
( instance
ksa) stream
|
print-instance-slots | |
( instance
link/nonlink-slot-event) stream
|
print-instance-slots | |
( instance
multiple-instances-event) stream
|
print-instance-slots | |
( instance
single-instance-event) stream
|
print-instance-slots | |
( instance
space-instance-event) stream
|
print-instance-slots | |
( instance
standard-event-instance) stream
|
print-instance-slots | |
( instance
standard-gbbopen-instance) stream
|
print-instance-slots | |
( instance
standard-unit-instance) stream
|
print-instance-slots | |
:after ( instance
standard-unit-instance) stream
|
Package :gbbopen-tools
Module :gbbopen-tools
Arguments and values
See also
print-instance-slot-value
standard-gbbopen-instance
Examples
Extend the print-object
printing for hyp
instances to include location
and belief
slot values:
(defmethod print-instance-slots ((obj hyp) stream)
(call-next-method)
(when (and (slot-boundp obj 'location)
(slot-boundp obj 'belief))
(format stream " ~s ~s"
(slot-value obj 'location)
(slot-value obj 'belief))))
or if displaying [Unbound]
for unbound slots is desired:
(defmethod print-instance-slots ((obj hyp) stream)
(call-next-method)
(print-instance-slot-value obj 'location stream)
(print-instance-slot-value obj 'belief stream))
The GBBopen Project