Stormancer::Serializer Class Reference

Public Member Functions

template<typename T , typename... Args>
void serialize (obytestream &stream, const T &value, const Args &... args) const
 
void serialize (obytestream &) const
 
template<typename TOutput >
TOutput deserializeOne (ibytestream &stream) const
 
template<typename TOutput >
TOutput deserializeOne (const byte *data, const uint64 dataSize, uint64 *readOffset=nullptr) const
 
template<typename... Args>
void deserialize (ibytestream &stream, Args &... args) const
 
template<typename TOutput >
void deserialize (const byte *data, const uint64 dataSize, TOutput &value, uint64 *readOffset=nullptr) const
 
template<>
void deserializeOne (ibytestream &) const
 
template<>
void deserializeOne (const byte *, const uint64, uint64 *) const
 

Member Function Documentation

◆ deserialize() [1/2]

template<typename TOutput >
void Stormancer::Serializer::deserialize ( const byte *  data,
const uint64  dataSize,
TOutput &  value,
uint64 *  readOffset = nullptr 
) const
inline

Try to deserialize a type from the provided stream and advances the stream.

Parameters
byteArraySource bytes array
Returns
the object deserialized from the stream.

◆ deserialize() [2/2]

template<typename... Args>
void Stormancer::Serializer::deserialize ( ibytestream stream,
Args &...  args 
) const
inline

Try to deserialize a type from the provided stream and advances the stream.

Parameters
sSource stream
Returns
the object deserialized from the stream.

◆ deserializeOne() [1/2]

template<typename TOutput >
TOutput Stormancer::Serializer::deserializeOne ( const byte *  data,
const uint64  dataSize,
uint64 *  readOffset = nullptr 
) const
inline

Try to deserialize a type from the provided stream and advances the stream.

Parameters
byteArraySource bytes array
Returns
the object deserialized from the stream.

◆ deserializeOne() [2/2]

template<typename TOutput >
TOutput Stormancer::Serializer::deserializeOne ( ibytestream stream) const
inline

Try to deserialize a type from the provided stream and advances the stream.

Parameters
sSource stream
Returns
the object deserialized from the stream.

The documentation for this class was generated from the following file:
  • stormancer/stormancer-sources/include/public/stormancer/Serializer.h