Class SerializationUtil

Class Documentation

class legion::core::serialization::SerializationUtil

Public Static Functions

template<class T>
static inline void JSONSerialize(std::stringstream os, T serializable)

JSON serialization from a stringstream.

Parameters
  • os: stringstream the ouput for the serialized object

  • serializable: template type that represents the object that needs to be serialized

template<class T>
static inline T JSONDeserialize(std::stringstream is)

JSON deserialization from a stringstream.

Return

the the deserialized object as type T

Parameters
  • is: stringstream the input of a serialized object

template<class T>
static inline void BinarySerialize(std::stringstream os, T serializable)

Binary serialization from a stringstream.

Parameters
  • os: stringstream the ouput for the serialized object

  • serializable: template type that represents the object that needs to be serialized

template<class T>
static inline T BinaryDeserialize(std::stringstream is)

Binary deserialization from a stringstream.

Return

the the deserialized object as type T

Parameters
  • is: stringstream the input of a serialized object

template<class T>
static inline void JSONSerialize(std::ofstream &os, T serializable)

JSON serialization from a filestream.

Parameters
  • os: filestream the ouput for the serialized object

  • serializable: template type that represents the object that needs to be serialized

template<class T>
static inline T JSONDeserialize(std::ifstream &is)

JSON deserialization from a filestream.

Return

the the deserialized object as type T

Parameters
  • is: filestream the input of a serialized object

template<class T>
static inline void BinarySerialize(std::ofstream &os, T serializable)

Binary serialization from a filestream.

Parameters
  • os: filestream the ouput for the serialized object

  • serializable: template type that represents the object that needs to be serialized

template<class T>
static inline T BinaryDeserialize(std::ifstream &is)

Binary deserialization from a filestream.

Return

the the deserialized object as type T

Parameters
  • is: filestream the input of a serialized object