![]() | ![]() | ![]() | initialize-saved/sent-instance | ![]() |
|
| instance slots slot-values missing-slot-names => instance | [Generic Function] |
Purpose
Load the blackboard repository (all unit instances and
space instances) that has been saved to a file previously by
save-blackboard-repository.
Method signatures
(instance standard-object)
slots slot-values missing-slot-names
=> instance
|
(instance standard-unit-instance)
slots slot-values missing-slot-names
=> instance
|
(instance standard-space-instance)
slots slot-values missing-slot-names
=> instance
|
Package :gbbopen-tools
Module :gbbopen-tools (the unit-instance and
space-instance methods are added by :gbbopen-core)
Arguments and values
| instance | A standard-object instance
| |
| slots | A list of effective-slot-definition objects
| |
| slot-values | A list of values (corresponding to the slots in slots) | |
| missing-slot-names | A list of symbols naming slots and slot values that were saved/sent, but which are no longer present in the class definition of instance. |
Returns
The instance.
See also
load-blackboard-repository
with-reading-saved/sent-objects-block
Examples
Restore the binary value of slot song in unit instances of
bird that was saved/sent as a Base64 portable string (see the companion
encoding
example):
(defmethod initialize-saved/sent-instance :after ((bird bird)
slots slot-values
missing-slot-names)
(declare (ignore slots slot-values missing-slot-names))
(setf (song-of bird) (base64-decode (song-of bird))))
Transfer the slot value that was saved/sent as the slot named old-slot
to the slot named new-slot in the current class definition of
hyp:
(defmethod initialize-saved/sent-instance :after ((hyp hyp)
slots slot-values
missing-slot-names)
(declare (ignore missing-slot-names))
(let ((position (position 'old-slot slots
:key #'slot-definition-name
:test #'eq)))
(setf (new-slot-of hyp) (nth position slot-values))))
The GBBopen Project
![]() | ![]() | ![]() | initialize-saved/sent-instance | ![]() |