cereal Namespace Reference

Classes

class  ArrayWrapper
 This class is used as a shim for cereal to be able to serialize a raw pointer array. More...

 
struct  is_cereal_archive
 
struct  is_cereal_archive_saving
 
struct  load_visitor
 
class  PointerVariantWrapper
 The objective of this class is to create a wrapper for boost::variant. More...

 
class  PointerVectorVariantWrapper
 The objective of this class is to create a wrapper for a vector of boost::variant that holds pointer. More...

 
class  PointerVectorWrapper
 The objective of this class is to create a wrapper for std::vector that hold pointers by adding also the size of the vector. More...

 
class  PointerWrapper
 The objective of this class is to create a wrapper for raw pointer by encapsulating them in a smart pointer of type unique_ptr. More...

 
struct  save_visitor
 

Functions

template<class Archive , template< typename... > class Map, typename... Args, typename = typename Map<Args...>::mapped_type>
void CEREAL_LOAD_FUNCTION_NAME (Archive &ar, Map< Args... > &map)
 Loading for std-like pair associative containers. More...

 
template<class Archive , template< typename... > class Map, typename... Args, typename = typename Map<Args...>::mapped_type>
void CEREAL_SAVE_FUNCTION_NAME (Archive &ar, Map< Args... > const &map)
 Saving for std-like pair associative containers. More...

 
template
<
typename
Archive
>
bool is_loading (const typename std::enable_if< is_cereal_archive< Archive >::value, Archive >::type *=0)
 
template
<
typename
Archive
>
bool is_loading (const typename std::enable_if< !is_cereal_archive< Archive >::value, Archive >::type *=0)
 
template
<
typename
Archive
>
bool is_saving (const typename std::enable_if< is_cereal_archive_saving< Archive >::value, Archive >::type *=0)
 
template
<
typename
Archive
>
bool is_saving (const typename std::enable_if< !is_cereal_archive_saving< Archive >::value, Archive >::type *=0)
 
template
<
class
T
,
class
S
>
ArrayWrapper< T > make_array (T *&t, S &s)
 This function is used to serialized old c-style array. More...

 
template
<
class
T
>
PointerWrapper< T > make_pointer (T *&t)
 Serialize raw pointer object by encapsulating the pointer into a smart pointer. More...

 
template<typename... VariantTypes>
PointerVariantWrapper< VariantTypes... > make_pointer_variant (boost::variant< VariantTypes... > &t)
 Serialize a boost variant in which the variant it self is a raw pointer. More...

 
template
<
class
T
>
PointerVectorWrapper< T > make_pointer_vector (std::vector< T *> &t)
 Serialize an std::vector that holds raw pointer object by encapsulating them into a smart pointer. More...

 
template<typename... VariantTypes>
PointerVectorVariantWrapper< VariantTypes... > make_vector_pointer_variant (std::vector< boost::variant< VariantTypes... >> &t)
 Serialize a std::vector of boost variants in which the variant in each boost variant is a raw pointer. More...

 

Function Documentation

◆ CEREAL_LOAD_FUNCTION_NAME()

void cereal::CEREAL_LOAD_FUNCTION_NAME ( Archive &  ar,
Map< Args... > &  map 
)
inline

Loading for std-like pair associative containers.

Definition at line 59 of file pair_associative_container.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

void cereal::CEREAL_SAVE_FUNCTION_NAME ( Archive &  ar,
Map< Args... > const &  map 
)
inline

Saving for std-like pair associative containers.

Definition at line 49 of file pair_associative_container.hpp.

◆ is_loading() [1/2]

bool cereal::is_loading ( const typename std::enable_if< is_cereal_archive< Archive >::value, Archive >::type *  = 0)

Definition at line 40 of file is_loading.hpp.

◆ is_loading() [2/2]

bool cereal::is_loading ( const typename std::enable_if< !is_cereal_archive< Archive >::value, Archive >::type *  = 0)

Definition at line 48 of file is_loading.hpp.

◆ is_saving() [1/2]

bool cereal::is_saving ( const typename std::enable_if< is_cereal_archive_saving< Archive >::value, Archive >::type *  = 0)

Definition at line 41 of file is_saving.hpp.

◆ is_saving() [2/2]

bool cereal::is_saving ( const typename std::enable_if< !is_cereal_archive_saving< Archive >::value, Archive >::type *  = 0)

Definition at line 49 of file is_saving.hpp.

◆ make_array()

ArrayWrapper<T> cereal::make_array ( T *&  t,
S &  s 
)
inline

This function is used to serialized old c-style array.

Parameters
tC Style array.
sthe size of the array.

Definition at line 74 of file array_wrapper.hpp.

◆ make_pointer()

PointerWrapper<T> cereal::make_pointer ( T *&  t)
inline

Serialize raw pointer object by encapsulating the pointer into a smart pointer.

Parameters
tA reference to raw pointer to be serialized.

Definition at line 83 of file pointer_wrapper.hpp.

◆ make_pointer_variant()

PointerVariantWrapper<VariantTypes...> cereal::make_pointer_variant ( boost::variant< VariantTypes... > &  t)
inline

Serialize a boost variant in which the variant it self is a raw pointer.

This wrapper will wrap each variant independently by encapsulating each variant into the PoninterWrapper we have created already.

Parameters
tA reference to boost variant that holds raw pointer.

Definition at line 42 of file pointer_variant_wrapper.hpp.

Referenced by load_visitor< T >::load_impl(), and save_visitor< Archive >::operator()().

◆ make_pointer_vector()

PointerVectorWrapper<T> cereal::make_pointer_vector ( std::vector< T *> &  t)
inline

Serialize an std::vector that holds raw pointer object by encapsulating them into a smart pointer.

Parameters
tA reference to std::vector that holds raw pointer to be serialized.

Definition at line 80 of file pointer_vector_wrapper.hpp.

◆ make_vector_pointer_variant()

PointerVectorVariantWrapper<VariantTypes...> cereal::make_vector_pointer_variant ( std::vector< boost::variant< VariantTypes... >> &  t)
inline

Serialize a std::vector of boost variants in which the variant in each boost variant is a raw pointer.

This wrapper will wrap each boost variant independently by encapsulating each boost variant into the PoninterVariantWrapper we have created already.

Parameters
tA reference to a vector of boost variants that holds raw pointer.

Definition at line 36 of file pointer_vector_variant_wrapper.hpp.