Binary serialization and unserialization. More...
#include <tpie/config.h>
#include <tpie/portability.h>
#include <typeinfo>
#include <type_traits>
#include <tpie/is_simple_iterator.h>
#include <array>
Go to the source code of this file.
Classes | |
struct | tpie::is_trivially_serializable< T > |
struct | tpie::bits::array_encode_magic< D, T, is_simple_itr, is_ts > |
Helper to facilitate fast serialization of trivially copyable arrays. More... | |
struct | tpie::bits::array_encode_magic< D, T, true, true > |
struct | tpie::bits::array_decode_magic< D, T, is_simple_itr, is_ts > |
Helper to facilitate fast unserialization of trivially copyable arrays. More... | |
struct | tpie::bits::array_decode_magic< D, T, true, true > |
struct | tpie::bits::counter |
Helper to count the serialized size of objects. More... | |
Namespaces | |
tpie | |
pipelining/factory_base.h Base class of pipelining factories | |
Functions | |
template<typename D > | |
void | tpie::serialize (D &dst, const foo &v) |
Sample tpie::serialize prototype. More... | |
template<typename S > | |
void | tpie::unserialize (S &src, foo &v) |
Sample tpie::unserialize prototype. More... | |
template<typename D , typename T > | |
void | tpie::serialize (D &dst, const T &v, typename std::enable_if< is_trivially_serializable< T >::value >::type *=0) |
tpie::serialize for POD/array types. More... | |
template<typename S , typename T > | |
void | tpie::unserialize (S &src, T &v, typename std::enable_if< is_trivially_serializable< T >::value >::type *=0) |
tpie::unserialize for POD/array types. More... | |
template<typename D , typename T > | |
void | tpie::serialize (D &dst, T start, T end) |
Serialize an array of serializables. More... | |
template<typename D , typename T > | |
void | tpie::unserialize (D &dst, T start, T end) |
Unserialize an array of serializables. More... | |
template<typename D , typename T , std::size_t size> | |
void | tpie::serialize (D &dst, const T(&x)[size]) |
tpie::serialize for fixed-length C-style arrays of serializable items. More... | |
template<typename S , typename T , std::size_t size> | |
void | tpie::unserialize (S &src, T(&x)[size]) |
tpie::unserialize for fixed-length C-style arrays unserializable items. More... | |
template<typename D , typename T , std::size_t size> | |
void | tpie::serialize (D &dst, const std::array< T, size > &v) |
tpie::serialize for std::arrays of serializable items. More... | |
template<typename S , typename T , std::size_t size> | |
void | tpie::unserialize (S &src, std::array< T, size > &v) |
tpie::unserialize for std::arrays of unserializable items. More... | |
template<typename D , typename T , typename alloc_t > | |
void | tpie::serialize (D &dst, const std::vector< T, alloc_t > &v) |
tpie::serialize for std::vectors of serializable items. More... | |
template<typename S , typename T , typename alloc_t > | |
void | tpie::unserialize (S &src, std::vector< T, alloc_t > &v) |
tpie::unserialize for std::vectors of unserializable items. More... | |
template<typename D , typename T > | |
void | tpie::serialize (D &dst, const std::basic_string< T > &v) |
tpie::serialize for std::basic_strings of serializable items, including std::strings. More... | |
template<typename S , typename T > | |
void | tpie::unserialize (S &src, std::basic_string< T > &v) |
tpie::unserialize for std::basic_strings of unserializable items, including std::strings. More... | |
template<typename T > | |
size_t | tpie::serialized_size (const T &v) |
Given a serializable, serialize it and measure its serialized size. More... | |
Binary serialization and unserialization.
This serialization framework is based on generic writers that have a write method accepting a source buffer and a byte size as parameters, and generic readers that have a read method accepting a destination buffer and a byte size as parameters.
Definition in file serialization2.h.