Binary serialization and unserialization. More...
#include <tpie/config.h>
#include <tpie/portability.h>
#include <typeinfo>
#include <boost/type_traits/is_pod.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/utility/enable_if.hpp>
#include <tpie/is_simple_iterator.h>
Go to the source code of this file.
Classes | |
struct | tpie::is_trivially_serializable_enable_if< bool > |
struct | tpie::is_trivially_serializable_enable_if< true > |
struct | tpie::is_trivially_serializable< T > |
struct | tpie::bits::array_encode_magic< D, T, is_simple_itr, is_pod, is_pointer > |
Helper to facilitate fast serialization of trivially copyable arrays. More... | |
struct | tpie::bits::array_encode_magic< D, T, true, true, false > |
struct | tpie::bits::array_decode_magic< D, T, is_simple_itr, is_pod, is_pointer > |
Helper to facilitate fast unserialization of trivially copyable arrays. More... | |
struct | tpie::bits::array_decode_magic< D, T, true, true, false > |
struct | tpie::bits::counter |
Helper to count the serialized size of objects. More... | |
Namespaces | |
tpie | |
TPIE's namespace. | |
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 boost::enable_if< is_trivially_serializable< T > >::type *=0, typename boost::disable_if< boost::is_pointer< T > >::type *=0) |
tpie::serialize for POD/array types. More... | |
template<typename S , typename T > | |
void | tpie::unserialize (S &src, T &v, typename boost::enable_if< is_trivially_serializable< T > >::type *=0, typename boost::disable_if< boost::is_pointer< T > >::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 , 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.