Main MRPT website > C++ reference for MRPT 1.5.6
List of all members | Public Member Functions | Protected Attributes
mrpt::utils::non_copiable_ptr< T > Struct Template Reference

Detailed Description

template<class T>
struct mrpt::utils::non_copiable_ptr< T >

A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtime if a copy is attempted.

See Also
CReferencedMemBlock, safe_ptr, non_copiable_ptr, copiable_NULL_ptr

Definition at line 125 of file safe_pointers.h.

#include <mrpt/utils/safe_pointers.h>

Inheritance diagram for mrpt::utils::non_copiable_ptr< T >:
Inheritance graph

Public Member Functions

 non_copiable_ptr ()
 
 non_copiable_ptr (const non_copiable_ptr< T > &o)
 
 non_copiable_ptr (const T *p)
 
non_copiable_ptr< T > & operator= (const T *p)
 
non_copiable_ptr< T > & operator= (const non_copiable_ptr< T > &)
 
virtual ~non_copiable_ptr ()
 
T & operator* ()
 
const T & operator* () const
 
T & operator[] (const size_t &i)
 
const T & operator[] (const size_t &i) const
 
void set (const T *p)
 This method can change the pointer, since the change is made explicitly, not through copy operators transparent to the user. More...
 
bool operator== (const T *o) const
 
bool operator== (const non_copiable_ptr_basic< T > &o) const
 
bool operator!= (const T *o) const
 
bool operator!= (const non_copiable_ptr_basic< T > &o) const
 
T *& get ()
 
const T * get () const
 
T ** getPtrToPtr ()
 
T *& operator-> ()
 
const T * operator-> () const
 

Protected Attributes

T * ptr
 

Constructor & Destructor Documentation

template<class T>
mrpt::utils::non_copiable_ptr< T >::non_copiable_ptr ( )
inline

Definition at line 128 of file safe_pointers.h.

template<class T>
mrpt::utils::non_copiable_ptr< T >::non_copiable_ptr ( const non_copiable_ptr< T > &  o)
inline

Definition at line 129 of file safe_pointers.h.

template<class T>
mrpt::utils::non_copiable_ptr< T >::non_copiable_ptr ( const T *  p)
inline

Definition at line 130 of file safe_pointers.h.

template<class T>
virtual mrpt::utils::non_copiable_ptr< T >::~non_copiable_ptr ( )
inlinevirtual

Definition at line 137 of file safe_pointers.h.

Member Function Documentation

template<class T>
T*& mrpt::utils::non_copiable_ptr_basic< T >::get ( )
inlineinherited

Definition at line 111 of file safe_pointers.h.

Referenced by mrpt::gui::CDisplayWindow3D::addTextMessage(), mrpt::gui::CDisplayWindow3D::clearTextMessages(), mrpt::utils::CMemoryStream::CMemoryStream(), mrpt::gui::CDisplayWindow3D::forceRepaint(), mrpt::gui::CDisplayWindow3D::getCameraAzimuthDeg(), mrpt::gui::CDisplayWindow3D::getCameraElevationDeg(), mrpt::gui::CDisplayWindow3D::getCameraPointingToPoint(), mrpt::gui::CDisplayWindow3D::getCameraZoom(), mrpt::gui::CDisplayWindow3D::getFOV(), mrpt::gui::CDisplayWindow::getLastMousePosition(), mrpt::gui::CDisplayWindowPlots::getLastMousePosition(), mrpt::gui::CDisplayWindow3D::getLastMousePosition(), mrpt::utils::CMemoryStream::getRawBufferData(), mrpt::gui::CBaseGUIWindow::getWxObject(), mrpt::gui::CDisplayWindow3D::isCameraProjective(), mrpt::utils::CMemoryStream::loadBufferFromFile(), mrpt::vision::CVideoFileWriter::open(), mrpt::vision::CVideoFileWriter::operator<<(), mrpt::utils::CConfigFileMemory::operator=(), mrpt::utils::CMemoryStream::Read(), mrpt::utils::CMemoryChunk::readFromStream(), mrpt::utils::CMemoryStream::resize(), mrpt::utils::CMemoryStream::saveBufferToFile(), mrpt::gui::CDisplayWindow3D::setCameraAzimuthDeg(), mrpt::gui::CDisplayWindow3D::setCameraElevationDeg(), mrpt::gui::CDisplayWindow3D::setCameraPointingToPoint(), mrpt::gui::CDisplayWindow3D::setCameraProjective(), mrpt::gui::CDisplayWindow3D::setCameraZoom(), mrpt::gui::CDisplayWindow::setCursorCross(), mrpt::gui::CDisplayWindowPlots::setCursorCross(), mrpt::gui::CDisplayWindow3D::setCursorCross(), mrpt::gui::CDisplayWindow3D::setFOV(), mrpt::gui::CDisplayWindow::showImage(), mrpt::gui::CDisplayWindow3D::useCameraFromScene(), mrpt::utils::CMemoryStream::Write(), and mrpt::vision::CVideoFileWriter::writeImage().

template<class T>
const T* mrpt::utils::non_copiable_ptr_basic< T >::get ( ) const
inlineinherited

Definition at line 112 of file safe_pointers.h.

template<class T>
T** mrpt::utils::non_copiable_ptr_basic< T >::getPtrToPtr ( )
inlineinherited

Definition at line 114 of file safe_pointers.h.

template<class T>
bool mrpt::utils::non_copiable_ptr_basic< T >::operator!= ( const T *  o) const
inlineinherited

Definition at line 108 of file safe_pointers.h.

template<class T>
bool mrpt::utils::non_copiable_ptr_basic< T >::operator!= ( const non_copiable_ptr_basic< T > &  o) const
inlineinherited

Definition at line 109 of file safe_pointers.h.

template<class T>
T& mrpt::utils::non_copiable_ptr< T >::operator* ( void  )
inline

Definition at line 139 of file safe_pointers.h.

References ASSERT_.

template<class T>
const T& mrpt::utils::non_copiable_ptr< T >::operator* ( void  ) const
inline

Definition at line 140 of file safe_pointers.h.

References ASSERT_.

template<class T>
T*& mrpt::utils::non_copiable_ptr_basic< T >::operator-> ( )
inlineinherited

Definition at line 116 of file safe_pointers.h.

template<class T>
const T* mrpt::utils::non_copiable_ptr_basic< T >::operator-> ( ) const
inlineinherited

Definition at line 117 of file safe_pointers.h.

template<class T>
non_copiable_ptr<T>& mrpt::utils::non_copiable_ptr< T >::operator= ( const T *  p)
inline

Definition at line 132 of file safe_pointers.h.

template<class T>
non_copiable_ptr<T>& mrpt::utils::non_copiable_ptr< T >::operator= ( const non_copiable_ptr< T > &  )
inline

Definition at line 134 of file safe_pointers.h.

References THROW_EXCEPTION.

template<class T>
bool mrpt::utils::non_copiable_ptr_basic< T >::operator== ( const T *  o) const
inlineinherited

Definition at line 105 of file safe_pointers.h.

template<class T>
bool mrpt::utils::non_copiable_ptr_basic< T >::operator== ( const non_copiable_ptr_basic< T > &  o) const
inlineinherited

Definition at line 106 of file safe_pointers.h.

template<class T>
T& mrpt::utils::non_copiable_ptr< T >::operator[] ( const size_t &  i)
inline

Definition at line 142 of file safe_pointers.h.

References ASSERT_.

template<class T>
const T& mrpt::utils::non_copiable_ptr< T >::operator[] ( const size_t &  i) const
inline

Definition at line 143 of file safe_pointers.h.

References ASSERT_.

template<class T>
void mrpt::utils::non_copiable_ptr_basic< T >::set ( const T *  p)
inlineinherited

This method can change the pointer, since the change is made explicitly, not through copy operators transparent to the user.

Definition at line 101 of file safe_pointers.h.

Referenced by mrpt::utils::CMemoryStream::assignMemoryNotOwn(), mrpt::hwdrivers::CFFMPEG_InputStream::CFFMPEG_InputStream(), mrpt::utils::CMemoryStream::resize(), and mrpt::hwdrivers::CFFMPEG_InputStream::~CFFMPEG_InputStream().

Member Data Documentation

template<class T>
T* mrpt::utils::non_copiable_ptr_basic< T >::ptr
protectedinherited



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