|
TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
|
Base interface for objects that support binary serialization. More...
#include <tec_serialize.hpp>
Public Member Functions | |
| virtual NetData & | store (NetData &s) const =0 |
| Serialize this object into a binary stream. | |
| virtual NetData & | load (NetData &s)=0 |
| Deserialize this object from a binary stream. | |
Base interface for objects that support binary serialization.
This is a pure abstract interface. Derived classes must implement all pure virtual methods to be instantiable.
Deserialize this object from a binary stream.
Implementations must read exactly the data that was previously written by store(). The stream is expected to contain valid data produced by a compatible version of store().
| s | The input stream to read from (guaranteed to be non-const) |
Serialize this object into a binary stream.
Implementations should write all necessary member data into the provided NetData object in a deterministic order. The stream must remain valid and writable for the duration of the call.
| s | The output stream to write into (guaranteed to be non-const) |