Larry Hunter <······@work.csb> wrote in article
<··············@work.csb>...
>
> Are there any free or inexpensive implementations of persistant object
> storage for CLOS? I'm running ACL 4.3 on an SGI (Irix 6.3) if that
> matters. I don't really need transaction processing, and all the bells
and
> whistles of ObjectStore or Statice, but if there's something already
done, I
> would prefer using that to rolling my own.
>
> Suggestions?
>
> Larry
If ACL 4.3 on an SGI (Irix 6.3) has the FASL-READ and FASL-WRITE functions
(ACLW 3.0.1 has got them), you should try to specialize on the
MAKE-LOAD-FORM generic function. Most of the methods are likely to look
like
(defmethod make-load-form ((self <your-class>))
(make-load-form-saving-slots self))
Then, you may use something like that
(defun load-document (pathname)
(with-open-file (stream pathname :direction :input)
(fasl-read stream)))
(defun save-document (pathname object)
(with-open-file (stream pathname :direction :output :if-exists
:supersede)
(fasl-write stream object)))))
ACLW do manage well in handling circularities by itslelf.
--
Sincerely,
Dmitri Ivanov
·······@aha.ru