9 #ifndef safe_pointers_H 10 #define safe_pointers_H 12 #include <mrpt/config.h> 51 T*&
get() {
return ptr; }
52 const T*
get()
const {
return ptr; }
101 void set(
const T*
p ) {
ptr =
const_cast<T*
>(
p); }
112 const T*
get()
const {
return ptr; }
166 void set(
const T*
p ) {
ptr =
const_cast<T*
>(
p); }
177 const T*
get()
const {
return ptr; }
213 const T*&
get()
const {
return ptr; }
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 NULL in the copy...
A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtim...
ignored_copy_ptr(const T *p)
#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)
ignored_copy_ptr(const ignored_copy_ptr< T > &)
bool operator!=(const T *o) const
bool operator==(const T *o) const
non_copiable_ptr(const non_copiable_ptr< T > &o)
virtual ~non_copiable_ptr_basic()
copiable_NULL_ptr_basic()
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()
non_copiable_ptr< T > & operator=(const T *p)
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)
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)
safe_ptr_basic< void > void_ptr
bool operator==(const T *o) const
A wrapper class for pointers that, if copied with the "=" operator, should be set to NULL in the new ...
virtual ~copiable_NULL_ptr_basic()
copiable_NULL_ptr_basic< T > & operator=(T *p)
bool operator==(const T *o) const
safe_ptr_basic< T > & operator=(T *p)
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 > &)