Main MRPT website > C++ reference for MRPT 1.5.6
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

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

Definition at line 158 of file safe_pointers.h.

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.

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.

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

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

Definition at line 176 of file safe_pointers.h.

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

Definition at line 177 of file safe_pointers.h.

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

Definition at line 179 of file safe_pointers.h.

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.

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.

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

Definition at line 181 of file safe_pointers.h.

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

Definition at line 182 of file safe_pointers.h.

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.

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.

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.

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.

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

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



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