Initializes the slots of instance when reading saved (or sent) values.
:gbbopen-tools (the unit-instance and
space-instance methods are added by
Arguments and values
|instance|| A |
|slots|| A list of |
|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
Initialize-saved/sent-instance is called when loading a blackboard repository or journal or when reading a network-streamer connection; it should not be called directly.
Restore the binary value of slot
song in unit instances of
bird that was saved/sent as a Base64 portable string (see the companion
(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
(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