mlpack
Classes | Functions
cereal Namespace Reference

Add an external serialization function for SpMat. More...

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<typename Archive , typename eT >
void serialize (Archive &ar, arma::SpMat< eT > &mat)
 
template<typename Archive , typename eT >
void serialize (Archive &ar, arma::Mat< eT > &mat)
 
template<typename Archive , typename eT >
void serialize (Archive &ar, arma::Cube< eT > &cube)
 
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<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 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.
 
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.
 
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<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...
 
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<class T >
PointerWrapper< T > make_pointer (T *&t)
 Serialize raw pointer object by encapsulating the pointer into a smart pointer. More...
 

Detailed Description

Add an external serialization function for SpMat.

Function Documentation

◆ make_array()

template<class T , class S >
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.

◆ make_pointer()

template<class T >
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.

◆ make_pointer_variant()

template<typename... VariantTypes>
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.

◆ make_pointer_vector()

template<class T >
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.

◆ make_vector_pointer_variant()

template<typename... VariantTypes>
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.