SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
Classes | Modules | Enumerations | Functions

Module Description

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:

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.

Classes

class  RWCompactObjectInputStreamImp
 Reads objects encoded in a compact format from the supplied RWDataInputStream. More...
 
class  RWCompactObjectOutputStreamImp
 Writes objects in a compact format to the supplied RWDataOutputStream. More...
 
class  RWDataFromVirtualInputStreamImp
 Adapter class that allows virtual input stream class RWvistream to be used where data input stream class RWDataInputStream is required. More...
 
class  RWDataToVirtualOutputStreamImp
 Adapter class that allows virtual output stream class RWvostream to be used where data output stream class RWDataOutputStream is required. More...
 
class  RWObjectInputStream
 Handle class for object input stream implementation classes. More...
 
class  RWObjectInputStreamImp
 Base class for all object input stream implementations. More...
 
class  RWObjectOutputStream
 Handle class for all the object output stream implementation classes. More...
 
class  RWObjectOutputStreamImp
 Base class for all object output stream implementations. More...
 
class  RWTInsertProxy< T >
 Proxy object for inserting objects with an instance name into object streams. More...
 
class  RWWithObjectInputContext
 Represents a guard object that opens and closes a context within a lexical scope for input streams. More...
 
class  RWWithObjectOutputContext
 Represents a guard object that opens and closes a context within a lexical scope for output streams. More...
 

Modules

 Serialization Macros
 

Enumerations

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
}
 

Functions

void rwTranslateAssoc (RWObjectInputStream &istrm, RWObjectOutputStream &ostrm)
 
void rwTranslateObject (RWObjectInputStream &istrm, RWObjectOutputStream &ostrm)
 
void rwTranslateObjectPointer (RWObjectInputStream &istrm, RWObjectOutputStream &ostrm)
 
void rwTranslateSequence (RWObjectInputStream &istrm, RWObjectOutputStream &ostrm)
 

Enumeration Type Documentation

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

Function Documentation

void rwTranslateAssoc ( RWObjectInputStream istrm,
RWObjectOutputStream 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 mapping (hash dictionary) from istrm and writes it out to ostrm.

void rwTranslateObject ( RWObjectInputStream istrm,
RWObjectOutputStream 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.

void rwTranslateObjectPointer ( RWObjectInputStream istrm,
RWObjectOutputStream 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.

void rwTranslateSequence ( RWObjectInputStream istrm,
RWObjectOutputStream 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.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.