Mail Archives: djgpp/1997/03/19/09:23:16
Alaric B. Williams wrote:
>
<snip question on persistence>
>
> There isn't that I've heard of. Certainly not in libgpp as such.
>
> What exactly do you want of serialisation? Transparent (quit the
> application, reload the application, memory space is preserved) or
> explicit (sending objects into streams)?
>
> If it's the latter, then it's /quite/ easy to write yourself. Just
> define a serialise(ostream&) function on every class you need
> serialisable, making sure the ostream is in binary mode since we'll
> use efficient binary storage thankyou, and provide a constructor
> myclass(istream&) which reconstructs the object from a binary istream.
>
>
The routine you have proposed is how it is basically done by most
developers who use compilers without explicit persistence. The
binary can then be saved into files or a database (say, as a blob).
Still, what I would like to see is a "top" class that could be
used as the parent of all classes that need to be persistent. And
they simply would be. All serialization, storage, and recovery would
be done "transparently" with options allowed to do specific things
such as "destroy", mem space copy, etc. A total package if you will
based on ideas and proposals bu the C++ standards committee perhaps.
At any rate, I will probably write something to this effect for my
own needs, and if it's any good I'll offer it up.
-- David T. McKee:
-- Think: Innovative Science Learning Systems
-- Physics, Electrical Science, Computer
-- Science, Natural Science, Theology
======================Signature Block====================
It is the glory of God to conceal a matter; To search out
a matter is the glory of kings. Pr 25:2
---------------------------------------------------------
There is nothing so sacred as it cannot be looked into...
=========================================================
- Raw text -