beautypg.com

Chapter 14: persistence – HP Integrity NonStop J-Series User Manual

Page 169

background image

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Chapter 14: Persistence

Levels of Persistence

A Note About Terminology

About the Examples in this Section

No Persistence

Simple Persistence

Two Examples of Simple Persistence

Isomorphic Persistence

Isomorphic versus Simple Persistence

Isomorphic Persistence of a Tools.h++ Class

Designing Your Class to Use Isomorphic Persistence

Writing rwSaveGuts and rwRestoreGuts Functions

Isomorphic Persistence of a User-designed Class

Polymorphic Persistence

Operators

Designing your Class to Use Polymorphic Persistence

Polymorphic Persistence Example

A Few Friendly Warnings

Always Save an Object by Value before Saving the Identical Object by
Pointer

Don't Save Distinct Objects with the Same Address

Don't Use Sorted RWCollections to Store Heterogeneous RWCollectables

Persistence is the ability to save an object to a file or a stream and then restore that object from
the file or stream. Persistence is a very important feature of objects because it facilitates the
exchange of objects between processes.
Using persistence and working through streams, you
can send objects from one program to another, or from one user to another. You can also save a
persistent object to a file on a disk, and restore it from disk at another time, or in another place.

This manual is related to the following products: