SourcePro Core
:
Advanced Tools Module User’s Guide
:
PART II Advanced Tools Module Packages
:
Using Object Serialization
: Getting Started
Getting Started
These are the basic steps required to add serialization support to your classes:
1.
Identify all classes that need to be serialized. Include all abstract base and concrete classes. (See
Serialization Requirements.
)
2.
Declare the streaming operators by putting macros in the header file for each class. (See
Declaring the Streaming Operators.
)
3.
Define the
streamContents()
function by putting macros in the source file for each class. (See
Defining the streamContents() Function.
)
4.
Write your object to an object stream and read it back. (See
Streaming the Serialized Object.
)
This site works best with JavaScript enabled