home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18942 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.9 KB

  1. 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
  2. From: udparmet@mcs.drexel.edu (Daniel J. Parmet)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Saving objects to files
  5. Keywords: OO database, file
  6. Message-ID: <1993Jan11.142505.6144@mcs.drexel.edu>
  7. Date: 11 Jan 93 14:25:05 GMT
  8. References: <1992Dec1.174945.1304@unix.brighton.ac.uk> <1fkfcoINNco3@agate.berkeley.edu>
  9. Organization: Drexel University
  10. Lines: 28
  11.  
  12. In article <1fkfcoINNco3@agate.berkeley.edu> jkelly@violet.berkeley.edu 
  13. (John Kelly;Extension MIS Office;36219;;LN41) writes:
  14. >>    I need to save a list (array) of *objects* to a file, so's that
  15. >>    I can load them back later. The objects describe various
  16. >>    different graphics (squares, circles, triangles etc) and aren't
  17. >>    guaranteed to have the same superclass.
  18. >>
  19. >>    Is there a convenient way (ie function call etc) with which the
  20. >>    above could be implemented?
  21. >
  22. >I have a similar problem, and it seems books on C++ and OOP are
  23. >a little shy about bringing up the topic. Any suggestions you send
  24. >to Titch, please copy to me--many thanks.
  25.  
  26. I seem to recall that certain C++ compilers allow for the keyword *persistent*
  27. before an object declaration.  This tells the system to save the object to
  28. a file upon program termination and to automatically read it back in when the
  29. program is run again.  (Essentially, it implements an object-oriented 
  30. database.)  I don't know much more about it and would be interested in more
  31. information if anyone has any.
  32.  
  33. Thanks.
  34.  
  35. -- 
  36. ********************************************************************************
  37. *                  Daniel J. Parmet (udparmet@mcs.drexel.edu)                  *
  38. *                   "If it's too loud, then you're too old!"                   *
  39. ********************************************************************************
  40.