fpmas 1.5
Static Public Member Functions | List of all members
fpmas::io::datapack::Serializer< std::vector< T > > Struct Template Reference

#include <datapack.h>

Static Public Member Functions

template<typename PackType >
static std::size_t size (const PackType &p, const std::vector< T > &vec)
 
template<typename PackType >
static void to_datapack (PackType &pack, const std::vector< T > &vec)
 
template<typename PackType >
static std::vector< T > from_datapack (const PackType &pack)
 

Detailed Description

template<typename T>
struct fpmas::io::datapack::Serializer< std::vector< T > >

std::vector Serializer specialization.

Serialization Scheme
vec.size() item_1 item_2 ... item_n

Member Function Documentation

◆ size()

template<typename T >
template<typename PackType >
static std::size_t fpmas::io::datapack::Serializer< std::vector< T > >::size ( const PackType &  p,
const std::vector< T > &  vec 
)
inlinestatic

Returns the buffer size required to serialize vec into p.

◆ to_datapack()

template<typename T >
template<typename PackType >
static void fpmas::io::datapack::Serializer< std::vector< T > >::to_datapack ( PackType &  pack,
const std::vector< T > &  vec 
)
inlinestatic

Serializes vec to pack.

Each item is serialized using the PackType::put(const T&) method.

Parameters
packdestination BasicObjectPack
vecvector to serialize

◆ from_datapack()

template<typename T >
template<typename PackType >
static std::vector< T > fpmas::io::datapack::Serializer< std::vector< T > >::from_datapack ( const PackType &  pack)
inlinestatic

Unserializes a vector from pack.

Each item of the vector is unserialized using the PackType::get<T>() method.

Parameters
packsource BasicObjectPack
Returns
unserialized vector

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