IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
Serializer Class Reference

#include <peak_icv/serialization/peak_icv_serializer.hpp>

Inheritance diagram for Serializer:

Public Member Functions

 Serializer (SerializationType type=SerializationType::Json)
 Constructor with archive and serialization type.
 
void Write (const peak::common::serialization::IArchive &archive, std::ostream &stream) override
 Writes the serialized archive data to an output stream.
 

Detailed Description

A serializer that serializes IArchive objects.

Since
ids_peak_icv 1.0

Definition at line 35 of file peak_icv_serializer.hpp.

Constructor & Destructor Documentation

◆ Serializer()

Constructor with archive and serialization type.

Constructs a Serializer with the specified IArchive object and serialization type. The archive will be serialized using the specified format when Write() is called. Default is JSON serialization if no other type is specified.

Parameters
typeThe serialization type to use as output format (defaults to SerializationType::Json)

Definition at line 67 of file peak_icv_serializer.hpp.

Member Function Documentation

◆ Write()

void Write ( const peak::common::serialization::IArchive & archive,
std::ostream & stream )
inlineoverridevirtual

Writes the serialized archive data to an output stream.

Serializes the IArchive object into the configured format (specified during construction) and writes the result to the provided output stream.

Parameters
archiveThe archive which is written to stream.
streamThe output stream to write the serialized data to
Since
ids_peak_icv 1.0

Implements ISerializer.

Definition at line 71 of file peak_icv_serializer.hpp.