Arch Sub-System: Coder |
01 | The encoder and decoder functions of Semys Lib are wrapped by corresponding classes, which furthermore implement a common interface. |
|
Coder |
02 | The common (abstract) Coder class defines the serialization methods for the basic types that are supported by the underlying coder Sub-System from Semys Lib, plus some helper methods. |
03 | The derived Encoder and Decoder objects implement the abstract methods and call the respective coder functions. |
04 |
A complex object (generally, any structural type) typically implements a method
called Code() that takes a reference to a Coder object. Most member data can be serialized with the coder object, regardless whether it is encoding or decoding. Typically only container objects need special attention. |
05 |
Simple example:
|
|
CoderContext |
06 |
The CoderContext class helps implementing version compatibility as described
in About: Method Compatibility. It codes a version number and a size value at construction and jumps to the end of the context at destruction. |
07 |
Simple example:
|
|
08 | See Lib Coder Sub-System for detailed information on serialization. |
Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details. |