R-Type
Functions
Serialization Namespace Reference

Functions

template<typename Data >
std::vector< std::byte > serializeData (Data data, std::size_t size)
 Template to serialize the data. More...
 
template<typename Data >
Data deserializeData (asio::streambuf &buffer, std::size_t size)
 Template to deserialize the data. More...
 

Function Documentation

◆ deserializeData()

template<typename Data >
std::vector< uint8_t > Serialization::deserializeData ( asio::streambuf &  buffer,
std::size_t  size 
)
inline

Template to deserialize the data.

Retrieve the data in a list of bytes.

Template Parameters
Datacorresponding of the type of data
Parameters
bufferthat we will retrieve the data
sizeof the data
Returns
the data
Parameters
bufferthat we will retrieve the data
sizeof the data
Returns
list of bytes

◆ serializeData()

template<typename Data >
std::vector<std::byte> Serialization::serializeData ( Data  data,
std::size_t  size 
)

Template to serialize the data.

Template Parameters
Datacorresponding of the type of data
Parameters
datathat need to be serialize
Returns
list of bytes (corresponding the data)