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...
Public Member Functions | |
PointerWrapper (T *&pointer) | |
template < class Archive > | |
void | load (Archive &ar, const uint32_t) |
T *& | release () |
template < class Archive > | |
void | save (Archive &ar, const uint32_t) const |
The objective of this class is to create a wrapper for raw pointer by encapsulating them in a smart pointer of type unique_ptr.
Cereal does not support the serialization of raw pointer out of the box. Therefore, we have created this wrapper to serialize raw pointer in cereal as a smart pointer since because it will be difficult to change all pointer type in mlpack.
Definition at line 44 of file pointer_wrapper.hpp.
|
inline |
Definition at line 47 of file pointer_wrapper.hpp.
|
inline |
Definition at line 62 of file pointer_wrapper.hpp.
|
inline |
Definition at line 69 of file pointer_wrapper.hpp.
|
inline |
Definition at line 52 of file pointer_wrapper.hpp.