Mail Archives: djgpp/1997/03/19/03:51:38
On Mon, 17 Mar 1997 19:10:13 GMT, David McKee
<david DOT mckee AT rtp DOT gtegsc DOT com> wrote:
>To the djgpp users list:
>My question pertains to if there is a way, perhaps
>using GNU's DBM or some other mechanism (serialize()? )
>to gain persitence in C++ with djgpp that is "widely"
>accepted. I would rather use a already coded application
>of this (or if it is alredy in gpp, I have not yet
>devoured all the docs, and faqs).
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.
>-- 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...
>=========================================================
Sounds good to me :-)
ABW
--
"Plug and Play support: WfEWAD will autodetect any installed
Nuclear Arsenals, Laser Satellites, Battlefield Control Networks,
Radar Installations, Fighter Squadrons, and other WfEWAD compliant
devices, including the new Macrosoft Unnatural Keyboard, with
full support for the now-famous Big Red Buttom(tm)."
(Windows for Early Warning and Defence User's manual P26)
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>
- Raw text -