www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/20/15:48:11

Comments: Authenticated sender is <alaric+abwillms AT sdps DOT demon DOT co DOT uk>
From: "Alaric B. Williams" <alaric AT abwillms DOT demon DOT co DOT uk>
To: David McKee <david DOT mckee AT rtp DOT gtegsc DOT com>
Date: Thu, 20 Mar 1997 18:58:09 +0000
MIME-Version: 1.0
Subject: Re: Persistence in Djgpp
Reply-to: alaric AT abwillms DOT demon DOT co DOT uk
CC: djgpp AT delorie DOT com
In-reply-to: <332FF509.6A73@rtp.gtegsc.com>
Message-ID: <858884986.0616694.0@abwillms.demon.co.uk>

On 19 Mar 97 at 9:15, David McKee wrote:
> Alaric B. Williams wrote:

> > 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. 

Yup... this being a compiler w/o explicit persistence :-)

> 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. 

We really need a MOP in C++ for that kind of thing... perhaps in the next C++ standard...

> 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.

Well, the C++ committee could do such a thing, but I expect it'll be 
more worthwhile just making a MOP so this and many other thing like or unlike it
can be produced. But it would "enhance" the complexity of compilers and runtime libraries :-(
 
> 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.

Seems like the best bet for now...


ABW
--
Alaric B. Williams (alaric AT abwillms DOT demon DOT co DOT uk)

   ---<## OpenDOS FAQ ##>---
Plain HTML: http://www.delorie.com/opendos/faq/

- Raw text -


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