9 #ifndef safe_pointers_H 10 #define safe_pointers_H 12 #include <mrpt/config.h> 53 T*&
get() {
return ptr; }
54 const T*
get()
const {
return ptr; }
136 void set(
const T*
p) {
ptr =
const_cast<T*
>(
p); }
151 const T*
get()
const {
return ptr; }
242 void set(
const T*
p) {
ptr =
const_cast<T*
>(
p); }
249 const T*
get()
const {
return ptr; }
303 const T*&
get()
const {
return ptr; }
bool operator==(const non_copiable_ptr_basic< T > &o) const
non_copiable_ptr_basic< T > & operator=(const non_copiable_ptr_basic< T > &)
ignored_copy_ptr< T > & operator=(T *p)
T & operator[](const size_t &i)
bool operator!=(const T *o) const
virtual ~ignored_copy_ptr()
A wrapper class for pointers that, if copied with the "=" operator, should be set to nullptr in the c...
A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtim...
ignored_copy_ptr(const T *p)
bool operator!=(const safe_ptr_basic< T > &o) const
#define THROW_EXCEPTION(msg)
non_copiable_ptr_basic(const T *p)
T & operator[](const size_t &i)
copiable_NULL_ptr(const copiable_NULL_ptr< T > &o)
const T & operator[](const size_t &i) const
ignored_copy_ptr< T > & operator=(const ignored_copy_ptr< T > &)
bool operator==(const ignored_copy_ptr< T > &o) const
ignored_copy_ptr(const ignored_copy_ptr< T > &)
bool operator!=(const T *o) const
non_copiable_ptr< T > & operator=(const non_copiable_ptr< T > &)
bool operator==(const T *o) const
non_copiable_ptr(const non_copiable_ptr< T > &o)
virtual ~non_copiable_ptr_basic()
copiable_NULL_ptr_basic()
bool operator==(const copiable_NULL_ptr_basic< T > &o) const
const T * operator->() const
safe_ptr_basic(const safe_ptr_basic< T > &o)
virtual ~copiable_NULL_ptr()
bool operator==(const T *o) const
bool operator!=(const T *o) const
copiable_NULL_ptr< T > & operator=(T *p)
virtual ~non_copiable_ptr()
bool operator!=(const non_copiable_ptr_basic< T > &o) const
const T & operator*() const
const T * operator->() const
non_copiable_ptr< T > & operator=(const T *p)
const T & operator[](const size_t &i) const
const T & operator*() const
non_copiable_ptr_basic< void > void_ptr_noncopy
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
safe_ptr(const safe_ptr< T > &o)
non_copiable_ptr_basic< T > & operator=(T *p)
const T *& operator->() const
copiable_NULL_ptr_basic(const copiable_NULL_ptr_basic< T > &)
bool operator!=(const T *o) const
virtual ~safe_ptr_basic()
non_copiable_ptr(const T *p)
const T * operator->() const
safe_ptr_basic< void > void_ptr
bool operator==(const T *o) const
const T & operator*() const
A wrapper class for pointers that, if copied with the "=" operator, should be set to nullptr in the n...
bool operator!=(const copiable_NULL_ptr_basic< T > &o) const
virtual ~copiable_NULL_ptr_basic()
copiable_NULL_ptr_basic< T > & operator=(const copiable_NULL_ptr_basic< T > &)
bool operator!=(const ignored_copy_ptr< T > &o) const
safe_ptr_basic< T > & operator=(const safe_ptr_basic< T > &o)
copiable_NULL_ptr_basic< T > & operator=(T *p)
bool operator==(const safe_ptr_basic< T > &o) const
bool operator==(const T *o) const
safe_ptr_basic< T > & operator=(T *p)
const T & operator[](const size_t &i) const
A wrapper class for pointers whose copy operations from other objects of the same type are ignored...
A wrapper class for pointers that can be safely copied with "=" operator without problems.
T & operator[](const size_t &i)
A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtim...
A wrapper class for pointers that can be safely copied with "=" operator without problems.
safe_ptr_basic(const T *p)
non_copiable_ptr_basic(const non_copiable_ptr_basic< T > &)