![]() |
fpmas 1.6
|
#include <ptr_wrapper.h>
Public Types | |
typedef T | element_type |
typedef T * | pointer |
Public Member Functions | |
PtrWrapper () | |
PtrWrapper (T *ptr) | |
T * | get () |
const T * | get () const |
T * | release () |
T * | operator-> () |
const T * | operator-> () const |
T & | operator* () |
const T & | operator* () const |
operator T* () | |
operator const T * () const | |
Protected Attributes | |
T * | ptr |
A trivial pointer wrapper helper class.
Such wrappers are notably used to allow JSON serialization of pointers with the nlohmann library, since using directly a pointer as type raised some errors.
It also maked pointer usage as data type in api::graph::DistributedGraph easier.
typedef T fpmas::api::utils::PtrWrapper< T >::element_type |
Type of object managed by this PtrWrapper.
typedef T* fpmas::api::utils::PtrWrapper< T >::pointer |
Pointer type wrapped by this PtrWrapper.
|
inline |
PtrWrapper default constructor.
The internal pointer is initialized to nullptr
.
|
inline |
PtrWrapper constructor.
ptr | pointer to wrap |
|
inline |
Gets the internal pointer.
|
inline |
Gets the internal pointer.
|
inline |
Returns the internal pointer and sets it to nullptr
.
|
inline |
Member of pointer operator.
|
inline |
Member of pointer operator.
|
inline |
Indirection operator.
|
inline |
Indirection operator.
|
inline |
Implicit pointer conversion operator.
|
inline |
Implicit pointer conversion operator.
|
protected |
Internal pointer.