[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make-load-form-saving-slots



MAKE-LOAD-FORM-SAVING-SLOTS is actualll easy to implement.  Last week
there was a discussion about accessing the descriptions of a class's
slots.  CLASS-SLOTS returns a list of descriptions of the slots.  You
will probably need to look at them to see how to decode them (they might
not conform to the descriptions in the meta-object protocol yet) but
that won't be hard.  Once you know the names of all the slots, all you
need to do is loop over the list of slots.  If the slot is bound to
generate a form which SETFs it to the value, if it is unbound, you
generate a form to make sure it is unbound.  I think that these forms
would probably be the second value of MAKE-LOAD-FORM-SAVING-SLOTS, the
first one being a call to ALLOCATE-INSTANCE.