SOLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
minhton::ISerializer Class Referenceabstract

#include <serializer.h>

Inheritance diagram for minhton::ISerializer:
minhton::serializer::SerializerCereal

Public Member Functions

virtual std::string serialize (const minhton::MessageVariant &msg)=0
 
virtual minhton::MessageVariant deserialize (const std::string &input)=0
 

Detailed Description

Interface defintion for a Serializer, based on the MessageVariant. Before sending a message from a node to another node that data needs to be serialized. Before a node can process a received packet, the data needs to be de-serialized. This two methods are taking care of die de-/serialization of MessageVariants.

Member Function Documentation

◆ deserialize()

virtual minhton::MessageVariant minhton::ISerializer::deserialize ( const std::string &  input)
pure virtual

Deserialize message

Parameters
inputMessage as string which should be deserialized
Returns
shared_ptr to the deserialized message

Implemented in minhton::serializer::SerializerCereal.

◆ serialize()

virtual std::string minhton::ISerializer::serialize ( const minhton::MessageVariant &  msg)
pure virtual

Serialize message

Parameters
msgMessage to be serialized
Returns
Message as serialized string

Implemented in minhton::serializer::SerializerCereal.


The documentation for this class was generated from the following file: