template class mrpt::containers::internal::generic_copier_ptr¶
#include <mrpt/containers/deepcopy_ptr.h> template <typename T, typename Copier> class generic_copier_ptr { public: // typedefs typedef T value_type; typedef Copier copier_t; // construction generic_copier_ptr(T* ptr); generic_copier_ptr(); generic_copier_ptr(const generic_copier_ptr<T, Copier>& o); generic_copier_ptr(generic_copier_ptr<T, Copier>&& o); // methods generic_copier_ptr<T, Copier>& operator = (generic_copier_ptr<T, Copier>&& o); generic_copier_ptr<T, Copier>& operator = (const generic_copier_ptr<T, Copier>& o); T* operator -> (); const T* operator -> () const; T& operator * (); const T& operator * () const; T* get(); const T* get() const; operator bool () const; bool operator ! () const; T* release(); void reset(T* ptr = nullptr); void resetDefaultCtor(); };
Construction¶
generic_copier_ptr(T* ptr)
Ctor from a pointer; takes ownership.
generic_copier_ptr()
Default ctor; init to nullptr.
generic_copier_ptr(const generic_copier_ptr<T, Copier>& o)
copy ctor: makes a copy of the object via clone()
generic_copier_ptr(generic_copier_ptr<T, Copier>&& o)
move ctor
Methods¶
generic_copier_ptr<T, Copier>& operator = (generic_copier_ptr<T, Copier>&& o)
move operator
generic_copier_ptr<T, Copier>& operator = (const generic_copier_ptr<T, Copier>& o)
copy operator
T* release()
Releases the pointer (do not destroy the object)