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 the Advanced Tools Module User's Guide.
|
enum | RWStreamType {
RW_UNSUPPORTED,
RW_CHAR,
RW_WCHAR_T,
RW_UNSIGNED_CHAR,
RW_DOUBLE,
RW_FLOAT,
RW_INT,
RW_UNSIGNED_INT,
RW_LONG,
RW_UNSIGNED_LONG,
RW_SHORT,
RW_UNSIGNED_SHORT,
RW_STRING,
RW_DATE,
RW_OBJECT,
RW_NESTED_OBJECT,
RW_BOOL,
RW_LONG_DOUBLE,
RW_LONG_LONG,
RW_UNSIGNED_LONG_LONG,
RW_ID,
RW_IDREF,
RW_DECIMAL_PORTABLE,
RW_DATETIME,
RW_NAMESPACE,
RW_TYPE,
RW_SEQ,
RW_SEQ_ELEMENT,
RW_ASSOC,
RW_ASSOC_ELEMENT
} |
|
Constants used to encode simplified type information within annotated object streams.
Enumerator |
---|
RW_UNSUPPORTED |
= 0
|
RW_CHAR |
= 1
|
RW_WCHAR_T |
= 2
|
RW_UNSIGNED_CHAR |
= 3
|
RW_DOUBLE |
= 4
|
RW_FLOAT |
= 5
|
RW_INT |
= 6
|
RW_UNSIGNED_INT |
= 7
|
RW_LONG |
= 8
|
RW_UNSIGNED_LONG |
= 9
|
RW_SHORT |
= 10
|
RW_UNSIGNED_SHORT |
= 11
|
RW_STRING |
= 12
|
RW_DATE |
= 13
|
RW_OBJECT |
= 14
|
RW_NESTED_OBJECT |
= 15
|
RW_BOOL |
= 16
|
RW_LONG_DOUBLE |
= 17
|
RW_LONG_LONG |
= 18
|
RW_UNSIGNED_LONG_LONG |
= 19
|
RW_ID |
= 20
|
RW_IDREF |
= 21
|
RW_DECIMAL_PORTABLE |
= 22
|
RW_DATETIME |
= 23
|
RW_NAMESPACE |
= 30
|
RW_TYPE |
= 40
|
RW_SEQ |
= 100
|
RW_SEQ_ELEMENT |
= 101
|
RW_ASSOC |
= 10000
|
RW_ASSOC_ELEMENT |
= 10001
|
- Header File
1 #include <rw/serial/objectStreamTranslate.h>
Global function that reads from an annotated object input stream, and outputs to an object output stream. Not required to be annotated.
Reads a serialized mapping (hash dictionary) from istrm and writes it out to ostrm.
- Header File
1 #include <rw/serial/objectStreamTranslate.h>
Global function that reads from an annotated object input stream, and outputs to an object output stream. Not required to be annotated.
Reads a serialized object value from istrm and writes it out to ostrm.
- Header File
1 #include <rw/serial/objectStreamTranslate.h>
Global function that reads from an annotated object input stream, and outputs to an object output stream. Not required to be annotated.
Reads a serialized object pointer from istrm and writes it out to ostrm.
- Header File
1 #include <rw/serial/objectStreamTranslate.h>
Global function that reads from an annotated object input stream, and outputs to an object output stream. Not required to be annotated.
Reads a serialized sequence from istrm and writes it out to ostrm.