Main MRPT website > C++ reference for MRPT 1.5.6
Classes | Namespaces | Macros
pimpl.h File Reference
#include <mrpt/config.h>
#include <mrpt/utils/mrpt_macros.h>
#include <memory>
Include dependency graph for pimpl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::utils::pimpl< T >
 Pointer to IMPLementation auxiliary structure to make raw pointers movable, copiable and automatically deleted. More...
 

Namespaces

 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.
 

Macros

#define PIMPL_FORWARD_DECLARATION(_TYPE)   _TYPE
 
#define PIMPL_DECLARE_TYPE(_TYPE, _VAR_NAME)   mrpt::utils::pimpl<_TYPE> _VAR_NAME
 
#define PIMPL_IMPLEMENT(_TYPE)
 
#define PIMPL_CONSTRUCT(_TYPE, _VAR_NAME)   _VAR_NAME.ptr.reset( new _TYPE())
 
#define PIMPL_GET_PTR(_TYPE, _VAR_NAME)   _VAR_NAME.ptr.get()
 
#define PIMPL_GET_REF(_TYPE, _VAR_NAME)   (*_VAR_NAME.ptr.get())
 
#define PIMPL_GET_CONSTREF(_TYPE, _VAR_NAME)   (*_VAR_NAME.ptr.get())
 

Macro Definition Documentation

#define PIMPL_CONSTRUCT (   _TYPE,
  _VAR_NAME 
)    _VAR_NAME.ptr.reset( new _TYPE())
#define PIMPL_DECLARE_TYPE (   _TYPE,
  _VAR_NAME 
)    mrpt::utils::pimpl<_TYPE> _VAR_NAME

Definition at line 49 of file pimpl.h.

#define PIMPL_FORWARD_DECLARATION (   _TYPE)    _TYPE

Definition at line 47 of file pimpl.h.

#define PIMPL_GET_CONSTREF (   _TYPE,
  _VAR_NAME 
)    (*_VAR_NAME.ptr.get())
#define PIMPL_GET_PTR (   _TYPE,
  _VAR_NAME 
)    _VAR_NAME.ptr.get()
#define PIMPL_GET_REF (   _TYPE,
  _VAR_NAME 
)    (*_VAR_NAME.ptr.get())

Definition at line 75 of file pimpl.h.

Referenced by mrpt::maps::COctoMap::calcNumNodes(), mrpt::maps::CColouredOctoMap::calcNumNodes(), mrpt::maps::COctoMapBase< octree_t, octree_node_t >::castRay(), mrpt::math::CRuntimeCompiledExpression::compile(), mrpt::math::CRuntimeCompiledExpression::get_raw_exprtk_expr(), mrpt::maps::COctoMap::getAsOctoMapVoxels(), mrpt::maps::CColouredOctoMap::getAsOctoMapVoxels(), mrpt::maps::COctoMap::getClampingThresMax(), mrpt::maps::CColouredOctoMap::getClampingThresMax(), mrpt::maps::COctoMap::getClampingThresMaxLog(), mrpt::maps::CColouredOctoMap::getClampingThresMaxLog(), mrpt::maps::COctoMap::getClampingThresMin(), mrpt::maps::CColouredOctoMap::getClampingThresMin(), mrpt::maps::COctoMap::getClampingThresMinLog(), mrpt::maps::CColouredOctoMap::getClampingThresMinLog(), mrpt::maps::COctoMap::getMetricMax(), mrpt::maps::CColouredOctoMap::getMetricMax(), mrpt::maps::COctoMap::getMetricMin(), mrpt::maps::CColouredOctoMap::getMetricMin(), mrpt::maps::COctoMap::getMetricSize(), mrpt::maps::CColouredOctoMap::getMetricSize(), mrpt::maps::COctoMap::getOccupancyThres(), mrpt::maps::CColouredOctoMap::getOccupancyThres(), mrpt::maps::COctoMap::getOccupancyThresLog(), mrpt::maps::CColouredOctoMap::getOccupancyThresLog(), mrpt::maps::CColouredOctoMap::getPointColour(), mrpt::maps::COctoMapBase< octree_t, octree_node_t >::getPointOccupancy(), mrpt::maps::COctoMap::getProbHit(), mrpt::maps::CColouredOctoMap::getProbHit(), mrpt::maps::COctoMap::getProbHitLog(), mrpt::maps::CColouredOctoMap::getProbHitLog(), mrpt::maps::COctoMap::getProbMiss(), mrpt::maps::CColouredOctoMap::getProbMiss(), mrpt::maps::COctoMap::getProbMissLog(), mrpt::maps::CColouredOctoMap::getProbMissLog(), mrpt::maps::COctoMapBase< octree_t, octree_node_t >::insertPointCloud(), mrpt::maps::COctoMap::insertRay(), mrpt::maps::CColouredOctoMap::insertRay(), mrpt::maps::COctoMap::internal_clear(), mrpt::maps::CColouredOctoMap::internal_clear(), mrpt::maps::COctoMapBase< octree_t, octree_node_t >::internal_computeObservationLikelihood(), mrpt::maps::COctoMap::internal_insertObservation(), mrpt::maps::CColouredOctoMap::internal_insertObservation(), mrpt::maps::CColouredOctoMap::readFromStream(), mrpt::maps::COctoMap::readFromStream(), mrpt::math::CRuntimeCompiledExpression::register_symbol_table(), mrpt::maps::COctoMap::setClampingThresMax(), mrpt::maps::CColouredOctoMap::setClampingThresMax(), mrpt::maps::COctoMap::setClampingThresMin(), mrpt::maps::CColouredOctoMap::setClampingThresMin(), mrpt::maps::COctoMap::setOccupancyThres(), mrpt::maps::CColouredOctoMap::setOccupancyThres(), mrpt::maps::COctoMap::setProbHit(), mrpt::maps::CColouredOctoMap::setProbHit(), mrpt::maps::COctoMap::setProbMiss(), mrpt::maps::CColouredOctoMap::setProbMiss(), mrpt::maps::COctoMap::updateVoxel(), mrpt::maps::CColouredOctoMap::updateVoxel(), mrpt::maps::CColouredOctoMap::updateVoxelColour(), mrpt::maps::COctoMap::volume(), mrpt::maps::CColouredOctoMap::volume(), mrpt::maps::CColouredOctoMap::writeToStream(), and mrpt::maps::COctoMap::writeToStream().

#define PIMPL_IMPLEMENT (   _TYPE)
Value:
namespace mrpt { namespace utils { \
template <> pimpl<_TYPE>::pimpl() : ptr() {} \
template <> pimpl<_TYPE>::~pimpl() {} \
/* Movable */ \
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; } \
/* Copyable: */ \
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; \
} \
} }

Definition at line 52 of file pimpl.h.




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018