43 if (
this == &o)
return *
this;
53 #if (__cplusplus>199711L) 57 o.m_smartptr.clear_unique();
60 poly_ptr_ptr<T> &
operator =(poly_ptr_ptr<T> && o) {
61 if (
this == &o)
return *
this;
63 o.m_smartptr.clear_unique();
71 else throw std::runtime_error(
"dereferencing NULL poly_ptr_ptr");
73 const typename T::value_type *
pointer()
const {
75 else throw std::runtime_error(
"dereferencing NULL poly_ptr_ptr");
Wrapper to a smart pointer to polymorphic classes, capable of handling copy operator, etc.
const T::value_type & operator*(void) const
T::value_type * pointer()
poly_ptr_ptr(const poly_ptr_ptr< T > &o)
copy ctor: makes a copy of the object via clone()
const T::value_type * operator->() const
T::value_type & operator*(void)
T::value_type * operator->()
poly_ptr_ptr(const T &ptr)
Ctor from a smart pointer; makes deep copy.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
poly_ptr_ptr< T > & operator=(const poly_ptr_ptr< T > &o)
const T & get_ptr() const
bool operator!(void) const
const T::value_type * pointer() const
poly_ptr_ptr()
Default ctor; init to nullptr.