MRPT  1.9.9
mrpt::non_copiable_ptr_basic< T > Struct Template Reference

Detailed Description

template<class T>
struct mrpt::non_copiable_ptr_basic< 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
safe_ptr, non_copiable_ptr, copiable_NULL_ptr

Definition at line 107 of file safe_pointers.h.

#include <mrpt/core/safe_pointers.h>

Inheritance diagram for mrpt::non_copiable_ptr_basic< T >:
Inheritance graph

Public Member Functions

 non_copiable_ptr_basic ()
 
 non_copiable_ptr_basic (const non_copiable_ptr_basic< T > &)
 
 non_copiable_ptr_basic (const T *p)
 
non_copiable_ptr_basic< T > & operator= (T *p)
 
non_copiable_ptr_basic< T > & operator= (const non_copiable_ptr_basic< T > &)
 
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...
 
virtual ~non_copiable_ptr_basic ()
 
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

◆ non_copiable_ptr_basic() [1/3]

template<class T>
mrpt::non_copiable_ptr_basic< T >::non_copiable_ptr_basic ( )
inline

Definition at line 113 of file safe_pointers.h.

◆ non_copiable_ptr_basic() [2/3]

template<class T>
mrpt::non_copiable_ptr_basic< T >::non_copiable_ptr_basic ( const non_copiable_ptr_basic< T > &  )
inline

Definition at line 114 of file safe_pointers.h.

◆ non_copiable_ptr_basic() [3/3]

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

Definition at line 118 of file safe_pointers.h.

◆ ~non_copiable_ptr_basic()

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

Definition at line 133 of file safe_pointers.h.

Member Function Documentation

◆ get() [1/2]

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

Definition at line 146 of file safe_pointers.h.

Referenced by mrpt::gui::CDisplayWindow3D::addTextMessage(), mrpt::img::CEnhancedMetaFile::CEnhancedMetaFile(), mrpt::gui::CDisplayWindow3D::clearTextMessages(), mrpt::io::CMemoryStream::CMemoryStream(), mrpt::gui::CBaseGUIWindow::destroyWxWindow(), mrpt::img::CEnhancedMetaFile::drawImage(), 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::io::CMemoryStream::getRawBufferData(), mrpt::gui::CBaseGUIWindow::getWxObject(), mrpt::gui::CDisplayWindow3D::isCameraProjective(), mrpt::img::CEnhancedMetaFile::line(), mrpt::io::CMemoryStream::loadBufferFromFile(), mrpt::vision::CVideoFileWriter::open(), mrpt::vision::CVideoFileWriter::operator<<(), mrpt::io::CMemoryStream::Read(), mrpt::io::CMemoryStream::resize(), mrpt::io::CMemoryStream::saveBufferToFile(), mrpt::img::CEnhancedMetaFile::selectVectorTextFont(), 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::img::CEnhancedMetaFile::setPixel(), mrpt::gui::CDisplayWindow::showImage(), mrpt::img::CEnhancedMetaFile::textOut(), mrpt::gui::CDisplayWindow3D::useCameraFromScene(), mrpt::io::CMemoryStream::Write(), mrpt::vision::CVideoFileWriter::writeImage(), and mrpt::img::CEnhancedMetaFile::~CEnhancedMetaFile().

◆ get() [2/2]

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

Definition at line 147 of file safe_pointers.h.

◆ getPtrToPtr()

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

Definition at line 148 of file safe_pointers.h.

Referenced by mrpt::gui::CBaseGUIWindow::createWxWindow().

◆ operator!=() [1/2]

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

Definition at line 140 of file safe_pointers.h.

◆ operator!=() [2/2]

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

Definition at line 141 of file safe_pointers.h.

◆ operator->() [1/2]

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

Definition at line 149 of file safe_pointers.h.

◆ operator->() [2/2]

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

Definition at line 154 of file safe_pointers.h.

◆ operator=() [1/2]

template<class T>
non_copiable_ptr_basic<T>& mrpt::non_copiable_ptr_basic< T >::operator= ( T *  p)
inline

Definition at line 119 of file safe_pointers.h.

◆ operator=() [2/2]

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

Definition at line 125 of file safe_pointers.h.

◆ operator==() [1/2]

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

Definition at line 134 of file safe_pointers.h.

◆ operator==() [2/2]

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

Definition at line 135 of file safe_pointers.h.

◆ set()

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

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

Definition at line 132 of file safe_pointers.h.

Referenced by mrpt::io::CMemoryStream::assignMemoryNotOwn(), and mrpt::io::CMemoryStream::resize().

Member Data Documentation

◆ ptr




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020