pointer_vector_wrapper.hpp File Reference
Include dependency graph for pointer_vector_wrapper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

 

Namespaces

 cereal
 

Macros

#define CEREAL_VECTOR_POINTER(T)   cereal::make_pointer_vector(T)
 Cereal does not support the serialization of raw pointer. More...

 

Functions

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

 

Detailed Description

Author
Omar Shrit

Implementation of a vector wrapper to enable the serialization of the size of the vector in cereal

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Definition in file pointer_vector_wrapper.hpp.

Macro Definition Documentation

◆ CEREAL_VECTOR_POINTER

#define CEREAL_VECTOR_POINTER (   T)    cereal::make_pointer_vector(T)

Cereal does not support the serialization of raw pointer.

This macro enable developers to serialize std vectors that holds raw pointers by using the above PointerVectorWrapper class which replace the internal raw pointers by smart pointer internally.

Parameters
Tstd::vector that holds raw pointer to be serialized.

Definition at line 93 of file pointer_vector_wrapper.hpp.