Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Math Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

7.1 Overview

The Essential Math Module comes with an extensive and powerful persistence facility which can faithfully store and restore your vectors and matrices. In the Essential Math Module, store and restore are accomplished by the following member functions:

These functions can move objects to and from RWFile objects, and to and from the Rogue Wave virtual streams facility.

Class RWFile encapsulates ANSI-C file I/O. Objects saved through RWFile are saved in binary format, resulting in efficient storage and retrieval.

Classes RWvistream and RWvostream are abstract base classes of the Rogue Wave virtual streams facility. The specializing classes that derive from these abstract base classes determine their final output formats. For example, the classes RWpistream and RWpostream, which derive from RWvistream and RWvostream, respectively, store and retrieve objects using portable ASCII format. The results can even be transferred between different operating systems.

It is up to the user to decide whether to store to RWFiles or to virtual streams. RWFiles offer the advantage of speed, but limit portability of the results to the host machine. Virtual streams are not as fast, but the specializing classes RWpistream and RWpostream allow the results to be moved to any machine.

For more information on RWFile or the streaming classes, see the SourcePro C++ API Reference Guide.

There is one final way to store and retrieve objects. The overloaded left shift operator << prints the contents of an object in a human-readable form. Conversely, the overloaded right shift operator >> reads and parses an object from an istream in a human-understandable format. Here are their prototypes:

For most objects, the output of operator<<() can be fed into operator>>(). Note that this approach contrasts with restoreFrom() and saveOn(), which may store and restore to an ASCII stream, but not necessarily in a form that could be called human-readable.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.