fpmas 1.6
Static Public Member Functions | List of all members
fpmas::io::datapack::LightSerializer< T, Enable > Struct Template Reference

#include <datapack.h>

Static Public Member Functions

static std::size_t size (const LightObjectPack &p)
 
static std::size_t size (const LightObjectPack &p, const T &item)
 
static void to_datapack (LightObjectPack &pack, const T &item)
 
static T from_datapack (const LightObjectPack &pack)
 

Detailed Description

template<typename T, typename Enable = void>
struct fpmas::io::datapack::LightSerializer< T, Enable >

Light version of the fpmas::io::datapack::Serializer.

By default, falls back to the Serializer<T> specialization, but custom LightSerializer specializations can be defined.

Member Function Documentation

◆ size() [1/2]

template<typename T , typename Enable = void>
static std::size_t fpmas::io::datapack::LightSerializer< T, Enable >::size ( const LightObjectPack p)
inlinestatic

Returns the buffer size required to serialize any instance of T into p using the regular Serializer<T>::size(const LightObjectPack&) method if it is available.

◆ size() [2/2]

template<typename T , typename Enable = void>
static std::size_t fpmas::io::datapack::LightSerializer< T, Enable >::size ( const LightObjectPack p,
const T &  item 
)
inlinestatic

Returns the buffer size required to serialize item into p using the regular Serializer<T>::size(const LightObjectPack&, const T&) method.

◆ to_datapack()

template<typename T , typename Enable = void>
static void fpmas::io::datapack::LightSerializer< T, Enable >::to_datapack ( LightObjectPack pack,
const T &  item 
)
inlinestatic

Serializes item into pack using the regular Serializer<T>::to_datapack() specialization.

Parameters
packdestination pack
itemitem to serialize

◆ from_datapack()

template<typename T , typename Enable = void>
static T fpmas::io::datapack::LightSerializer< T, Enable >::from_datapack ( const LightObjectPack pack)
inlinestatic

Unserializes data from pack.

Data is unserialized using the regular Serializer<T>::from_datapack() specialization.

Parameters
packsource pack
Returns
deserialized data

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