#include <peak_icv/serialization/peak_icv_serializer.hpp>

Public Member Functions | |
| Serializer (SerializationType type=SerializationType::Json) | |
Constructs a Serializer with the specified serialization type. | |
| void | Write (const peak::common::serialization::IArchive &archive, std::ostream &stream) override |
| Serializes an archive and writes it to a stream. | |
Serializer for writing IArchive objects to an output stream.
This class converts an IArchive object into a specific serialization format and writes the result to a stream.
Example
|
inlineexplicit |
Constructs a Serializer with the specified serialization type.
The chosen format determines how the archive is written when Write() is called. If no type is provided, JSON is used by default.
| type | The serialization format to use (defaults to SerializationType::Json). |
|
inlineoverridevirtual |
Serializes an archive and writes it to a stream.
Converts the given IArchive object into the configured format and writes the serialized data to the provided stream.
| archive | The archive to serialize. |
| stream | The stream that receives the serialized data. |
| NotSupportedException | The serialization type is not supported. |
Implements ISerializer.