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

Detailed Description

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

A wrapper class for pointers whose copy operations from other objects of the same type are ignored, that is, doing "a=b;" has no effect neiter on "a" or "b".

In turn, assigning a pointer with a direct "=" operation from a plain "T*" type is permited.

See also
CReferencedMemBlock, safe_ptr, non_copiable_ptr, copiable_NULL_ptr

Definition at line 152 of file safe_pointers.h.

#include <mrpt/utils/safe_pointers.h>

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

Public Member Functions

 ignored_copy_ptr ()
 
 ignored_copy_ptr (const ignored_copy_ptr< T > &)
 
 ignored_copy_ptr (const T *p)
 
ignored_copy_ptr< T > & operator= (T *p)
 
ignored_copy_ptr< T > & operator= (const ignored_copy_ptr< 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 ~ignored_copy_ptr ()
 
bool operator== (const T *o) const
 
bool operator== (const ignored_copy_ptr< T > &o) const
 
bool operator!= (const T *o) const
 
bool operator!= (const ignored_copy_ptr< T > &o) const
 
T *& get ()
 
const T * get () const
 
T ** getPtrToPtr ()
 
T *& operator-> ()
 
const T * operator-> () const
 

Protected Attributes

T * ptr
 

Constructor & Destructor Documentation

◆ ignored_copy_ptr() [1/3]

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

Definition at line 158 of file safe_pointers.h.

◆ ignored_copy_ptr() [2/3]

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

Definition at line 159 of file safe_pointers.h.

◆ ignored_copy_ptr() [3/3]

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

Definition at line 160 of file safe_pointers.h.

◆ ~ignored_copy_ptr()

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

Definition at line 168 of file safe_pointers.h.

Member Function Documentation

◆ get() [1/2]

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

Definition at line 176 of file safe_pointers.h.

◆ get() [2/2]

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

Definition at line 177 of file safe_pointers.h.

◆ getPtrToPtr()

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

Definition at line 179 of file safe_pointers.h.

◆ operator!=() [1/2]

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

Definition at line 173 of file safe_pointers.h.

◆ operator!=() [2/2]

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

Definition at line 174 of file safe_pointers.h.

◆ operator->() [1/2]

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

Definition at line 181 of file safe_pointers.h.

◆ operator->() [2/2]

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

Definition at line 182 of file safe_pointers.h.

◆ operator=() [1/2]

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

Definition at line 161 of file safe_pointers.h.

◆ operator=() [2/2]

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

Definition at line 163 of file safe_pointers.h.

◆ operator==() [1/2]

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

Definition at line 170 of file safe_pointers.h.

◆ operator==() [2/2]

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

Definition at line 171 of file safe_pointers.h.

◆ set()

template<class T>
void mrpt::utils::ignored_copy_ptr< 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 166 of file safe_pointers.h.

Member Data Documentation

◆ ptr

template<class T>
T* mrpt::utils::ignored_copy_ptr< T >::ptr
protected



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019