PointerVariantWrapper< VariantTypes > Class Template Reference

The objective of this class is to create a wrapper for boost::variant. More...

Public Member Functions

 PointerVariantWrapper (boost::variant< VariantTypes... > &pointerVar)
 
template
<
class
Archive
>
void load (Archive &ar)
 
template
<
class
Archive
>
void save (Archive &ar) const
 

Detailed Description


template<typename... VariantTypes>
class cereal::PointerVariantWrapper< VariantTypes >

The objective of this class is to create a wrapper for boost::variant.

Cereal supports the serialization of boost::variant, but we need to serialize it if it holds a raw pointers. This class depeds on the PointerWrapper we have already created in which it is used to serialize each variant independently

Definition at line 31 of file pointer_variant_wrapper.hpp.

Constructor & Destructor Documentation

◆ PointerVariantWrapper()

PointerVariantWrapper ( boost::variant< VariantTypes... > &  pointerVar)
inline

Definition at line 110 of file pointer_variant_wrapper.hpp.

Member Function Documentation

◆ load()

void load ( Archive &  ar)
inline

Definition at line 125 of file pointer_variant_wrapper.hpp.

References save_visitor< Archive >::ar.

◆ save()

void save ( Archive &  ar) const
inline

Definition at line 115 of file pointer_variant_wrapper.hpp.

References save_visitor< Archive >::ar.


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