www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/19/09:23:16

Sender: mckee AT rtp DOT gtegsc DOT com
Message-ID: <332FF509.6A73@rtp.gtegsc.com>
Date: Wed, 19 Mar 1997 09:15:37 -0500
From: David McKee <david DOT mckee AT rtp DOT gtegsc DOT com>
Organization: GTE (My views are my own)
MIME-Version: 1.0
To: "Alaric B. Williams" <alaric AT abwillms DOT demon DOT co DOT uk>
CC: djgpp AT delorie DOT com
Subject: Re: Persistence in Djgpp
References: <332D9714 DOT 693 AT rtp DOT gtegsc DOT com> <332efba3 DOT 9985187 AT news DOT demon DOT co DOT uk>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019