![]() | ![]() | ![]() | change-class | ![]() |
| instance &key &allow-other-keys | [Generic Function] |
Purpose
Change the class of an instance to new-class.
Method signatures
:around
( instance standard-object)
( new-class standard-unit-class)
&key &allow-other-keys |
:around
( instance standard-object)
( new-class standard-unit-class)
&key &allow-other-keys |
:before
( instance standard-unit-instance)
( new-class standard-class)
&key &allow-other-keys |
:after
( instance standard-unit-instance)
( new-class standard-unit-class)
&key &allow-other-keys |
:after
( instance standard-object)
( new-class standard-unit-class)
&key &allow-other-keys |
Package :gbbopen
Module :gbbopen-core
Arguments and values
instance | A standard-object instance
| |
new-class | A class designator | |
changed-instance | A standard-object instance
|
Returns
The destructively modified instance.
Events
If instance is a unit instance, a
change-instance-class-event
instance-changed-class-event
The following events may also be signaled:
unlink-event
instance-removed-from-space-instance-event
link-event
nonlink-slot-updated-event
instance-added-to-space-instance-event
Errors
The existing or supplied instance name of instance is
identical to the instance name of an existing unit instance of
new-class.
Description
When new-class is a unit class, an instance-name conflict with
an existing unit instance of new-class must be avoided. If
the old class of instance and new-class are both unit
classes that use the global instance-name counter, the old instance-name value
can be retained safetly. If new-class is a unit class with a
class-based counter, specifying a new instance-name value (using
When the old class and new-class are both unit classes and no
space-instances value is supplied to
See also
define-unit-class
make-duplicate-instance-changing-class
next-class-instance-number
Example
Change the class of unit instance hyp
from
probable-hyp
rejected-hyp
> (change-class hyp 'rejected-hyp :instance-name (next-class-instance-number 'rejected-hyp)) #<rejected-hyp 1409 (896 388) .68> >Note that the
:instance-name
The GBBopen Project
![]() | ![]() | ![]() | change-class | ![]() |