home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!jvnc.net!newsserver.jvnc.net!netnews.upenn.edu!netnews.noc.drexel.edu!king.mcs.drexel.edu!udparmet
- From: udparmet@mcs.drexel.edu (Daniel J. Parmet)
- Newsgroups: comp.lang.c++
- Subject: Re: Saving objects to files
- Keywords: OO database, file
- Message-ID: <1993Jan11.142505.6144@mcs.drexel.edu>
- Date: 11 Jan 93 14:25:05 GMT
- References: <1992Dec1.174945.1304@unix.brighton.ac.uk> <1fkfcoINNco3@agate.berkeley.edu>
- Organization: Drexel University
- Lines: 28
-
- In article <1fkfcoINNco3@agate.berkeley.edu> jkelly@violet.berkeley.edu
- (John Kelly;Extension MIS Office;36219;;LN41) writes:
- >> I need to save a list (array) of *objects* to a file, so's that
- >> I can load them back later. The objects describe various
- >> different graphics (squares, circles, triangles etc) and aren't
- >> guaranteed to have the same superclass.
- >>
- >> Is there a convenient way (ie function call etc) with which the
- >> above could be implemented?
- >
- >I have a similar problem, and it seems books on C++ and OOP are
- >a little shy about bringing up the topic. Any suggestions you send
- >to Titch, please copy to me--many thanks.
-
- I seem to recall that certain C++ compilers allow for the keyword *persistent*
- before an object declaration. This tells the system to save the object to
- a file upon program termination and to automatically read it back in when the
- program is run again. (Essentially, it implements an object-oriented
- database.) I don't know much more about it and would be interested in more
- information if anyone has any.
-
- Thanks.
-
- --
- ********************************************************************************
- * Daniel J. Parmet (udparmet@mcs.drexel.edu) *
- * "If it's too loud, then you're too old!" *
- ********************************************************************************
-