PointerVectorWrapper< T > Class Template Reference

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...

Public Member Functions

 PointerVectorWrapper (std::vector< T *> &pointerVec)
 
template
<
class
Archive
>
void load (Archive &ar)
 
template
<
class
Archive
>
void save (Archive &ar) const
 

Detailed Description


template
<
class
T
>

class cereal::PointerVectorWrapper< T >

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

Cereal supports the serialization of the std vector, but we need to serialize the vector if it holds raw pointer. This wrapper uses the PointerWrapper we have already created, it serialize each pointer in the vector independently.

We need to add the size of the vector if it holds a raw pointers, during the serialization, so we can know the size of the number pointer to allocated during the deserialization process.

Definition at line 38 of file pointer_vector_wrapper.hpp.

Constructor & Destructor Documentation

◆ PointerVectorWrapper()

PointerVectorWrapper ( std::vector< T *> &  pointerVec)
inline

Definition at line 41 of file pointer_vector_wrapper.hpp.

Member Function Documentation

◆ load()

void load ( Archive &  ar)
inline

Definition at line 57 of file pointer_vector_wrapper.hpp.

References CEREAL_POINTER.

◆ save()

void save ( Archive &  ar) const
inline

Definition at line 46 of file pointer_vector_wrapper.hpp.

References CEREAL_POINTER.


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