Levels of persistence, A note about terminology, About the examples in this section – HP Integrity NonStop J-Series User Manual

Page 171

Advertising
background image

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

©Copyright 1996 Rogue Wave Software

Levels of Persistence

An object has one of four levels of persistence:

No persistence. There is no mechanism for storage and retrieval of the object.

Simple persistence. A level of persistence that provides storage and retrieval of
individual objects to and from a stream or file. Simple persistence does not preserve
pointer relationships among the persisted objects.

Isomorphic persistence. A level of persistence that preserves the pointer relationships
among the persisted objects.

Polymorphic persistence. The highest level of persistence. Polymorphic persistence
preserves pointer relationships among the persisted objects and allows the restoring
process to restore an object without prior knowledge of that object's type.

The Class Reference indicates the level of persistence for each class. This section provides
information about each level of persistence through descriptions, examples, and procedures for
designing your own persistent classes.

A Note About Terminology

Tools.h++ provides input and output classes that let you save and restore objects. These classes
are:

RWFile

: RWFile lets you save and restore objects to a file;

RWvostream: Classes derived from

RWvostream

, such as

RWpostream

,

RWbostream,

and

RWeostream

, are used to save objects;

RWvistream

: Classes derived from RWvistream, such as

RWpostream

,

RWbistream

, and

RWeistream

, are used to restore objects.

To keep our explanations simple, we'll refer to all of these input and output classes as streams.
For a discussion of the trade-offs in using

RWvostream

and

RWvistream

versus

RWFile

, see

Chapter 6

and

Chapter 7

.

Advertising
This manual is related to the following products: