The Serialization package provides a way to flatten objects, so they can be easily transported across communication boundaries or stored to disk. This object serialization mechanism includes two processes:
Translation of an object or set of related objects in memory into a linear series of atomic events or tokens
Translation of such a series back into an equivalent object or set of related objects
The classes, macros, and functions in the Serialization package help you to define serializable objects with a minimum of custom code, while retaining control over the formats and policies used. To make your C++ classes serializable, you instrument them with a small set of streaming macros. These macros encapsulate the details associated with streaming protocols, shielding your application from the implementation details but otherwise not affecting your application code. You have a choice of intrusive serialization for your own classes or external serialization for classes that you can't modify, such as classes from a third-party library. The Serialization package also includes a set of utility functions for streaming objects to and from various formats.
For complete information about the Serialization package, see Chapters 4 and 5 of the Advanced Tools Module User's Guide.
Figure 1 shows the hierarchy of classes for the Serialization package.
Table 1 contains a list of the global members of the Serialization package. See Part II, "Global Reference."
Name | Description |
Macros for serialization | |
Global function | |
Global function | |
Global enumerator | |
Global function | |
Global function | |
Global function |
Table 2 contains a list of the public classes in the Serialization package. See Part III, "Reference."
Class Name | Description |
Reads objects encoded in a compact format from the supplied RWDataInputStream. | |
Writes objects encoded in a compact format from the supplied RWDataOutputStream. | |
An adapter class that allows an Essential Tools Module virtual input stream (RWvistream) to be used where a RWDataInputStream is required. Implements the body idiom from the handle-body pattern. | |
An adapter class that allows an Essential Tools Module virtual output stream (RWvostream) to be used where a RWDataOutputStream is required. Implements the body idiom from the handle-body pattern. | |
Handle class for object input stream implementation classes. Implements the handle idiom from the handle-body pattern. | |
Base class for all object input stream implementations. The derivation from filtered data input stream provided default implementations for output of all primitive types and allows the low level stream formatting to be controlled by delegation to a separate data input stream object. | |
Handle class for all the object output stream implementation classes. Implements the handle idiom from the handle-body pattern. | |
Base class for all object output streams. Inherits default operations for streaming primitives from data output stream. | |
A proxy object for inserting objects with an instance name into object streams | |
A guard class used to initialize a context for an object input stream. | |
A guard class used to initialize a context for an object output stream. |
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.