From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams) Newsgroups: comp.os.msdos.djgpp Subject: Re: Persistence in Djgpp Date: Wed, 19 Mar 1997 06:52:16 GMT Message-ID: <332efba3.9985187@news.demon.co.uk> References: <332D9714 DOT 693 AT rtp DOT gtegsc DOT com> NNTP-Posting-Host: abwillms.demon.co.uk Lines: 50 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Mon, 17 Mar 1997 19:10:13 GMT, David McKee 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 Hello :-)