Go to the documentation of this file.
28 if (!o)
return nullptr;
38 if (!o)
return nullptr;
39 T*
n =
dynamic_cast<T*
>(o->clone());
41 throw std::runtime_error(
"error: clone() returned unexpected type");
46 template <
typename T,
typename Copier>
80 if (
this == &o)
return *
this;
90 if (
this == &o)
return *
this;
101 throw std::runtime_error(
"dereferencing nullptr poly_ptr");
108 throw std::runtime_error(
"dereferencing nullptr poly_ptr");
116 throw std::runtime_error(
"dereferencing nullptr poly_ptr");
123 throw std::runtime_error(
"dereferencing nullptr poly_ptr");
128 operator bool()
const {
return m_ptr !=
nullptr; }
140 if (ptr ==
m_ptr)
return;
156 template <
typename T>
164 template <
typename T>
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool operator!(void) const
void move_from(generic_copier_ptr &o)
GLdouble GLdouble GLdouble r
generic_copier_ptr(generic_copier_ptr< T, Copier > &&o)
move ctor
generic_copier_ptr(T *ptr)
Ctor from a pointer; takes ownership.
generic_copier_ptr()
Default ctor; init to nullptr.
const T & operator*(void) const
T * release()
Releases the pointer (do not destroy the object)
generic_copier_ptr< T, Copier > & operator=(const generic_copier_ptr< T, Copier > &o)
copy operator
void reset(T *ptr=nullptr)
generic_copier_ptr< T, Copier > & operator=(generic_copier_ptr< T, Copier > &&o)
move operator
generic_copier_ptr(const generic_copier_ptr< T, Copier > &o)
copy ctor: makes a copy of the object via clone()
const T * operator->() const
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |