#include <mrpt/config.h>
#include <mrpt/utils/mrpt_macros.h>
#include <memory>
Go to the source code of this file.
|
| struct | mrpt::utils::pimpl< T > |
| | Pointer to IMPLementation auxiliary structure to make raw pointers movable, copiable and automatically deleted. More...
|
| |
|
| | mrpt |
| | This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
|
| |
| | mrpt::utils |
| | Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
|
| |
◆ PIMPL_CONSTRUCT
◆ PIMPL_DECLARE_TYPE
◆ PIMPL_FORWARD_DECLARATION
| #define PIMPL_FORWARD_DECLARATION |
( |
|
_TYPE | ) |
_TYPE |
◆ PIMPL_GET_CONSTREF
| #define PIMPL_GET_CONSTREF |
( |
|
_TYPE, |
|
|
|
_VAR_NAME |
|
) |
| (*_VAR_NAME.ptr.get()) |
◆ PIMPL_GET_PTR
| #define PIMPL_GET_PTR |
( |
|
_TYPE, |
|
|
|
_VAR_NAME |
|
) |
| _VAR_NAME.ptr.get() |
◆ PIMPL_GET_REF
| #define PIMPL_GET_REF |
( |
|
_TYPE, |
|
|
|
_VAR_NAME |
|
) |
| (*_VAR_NAME.ptr.get()) |
◆ PIMPL_IMPLEMENT
| #define PIMPL_IMPLEMENT |
( |
|
_TYPE | ) |
|
Value: namespace mrpt {
namespace utils { \
template <> pimpl<_TYPE>::pimpl() : ptr() {} \
template <> pimpl<_TYPE>::~pimpl() {} \
\
template <> pimpl<_TYPE>::pimpl(pimpl<_TYPE> && op) noexcept : ptr(std::move(op.ptr)) {} \
template <> pimpl<_TYPE>& pimpl<_TYPE>::operator=(pimpl<_TYPE>&& op) noexcept { ptr = std::move(op.ptr); return *this; } \
\
template <> pimpl<_TYPE>::pimpl(const pimpl<_TYPE> & op) { \
if (op.ptr.get() == ptr.get()) return; \
ptr.
reset(new _TYPE(*op.ptr)); \
} \
template <> pimpl<_TYPE>& pimpl<_TYPE>::operator=(const pimpl<_TYPE>& op) { \
if (op.ptr.get() == ptr.get()) return *this; \
ptr.
reset(new _TYPE(*op.ptr)); \
return *this; \
} \
} }
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition at line 52 of file pimpl.h.