mlpack
Public Member Functions | List of all members
cereal::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...

#include <pointer_vector_wrapper.hpp>

Public Member Functions

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

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.


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