MRPT  2.0.1
List of all members | Public Types | Public Member Functions | Protected Attributes
mrpt::containers::internal::generic_copier_ptr< T, Copier > Class Template Reference

Detailed Description

template<typename T, typename Copier>
class mrpt::containers::internal::generic_copier_ptr< T, Copier >

Definition at line 47 of file deepcopy_ptr.h.

#include <mrpt/containers/deepcopy_ptr.h>

Inheritance diagram for mrpt::containers::internal::generic_copier_ptr< T, Copier >:

Public Types

using value_type = T
 
using copier_t = Copier
 

Public Member Functions

 generic_copier_ptr (T *ptr)
 Ctor from a pointer; takes ownership. More...
 
 generic_copier_ptr ()
 Default ctor; init to nullptr. More...
 
 generic_copier_ptr (const generic_copier_ptr< T, Copier > &o)
 copy ctor: makes a copy of the object via clone() More...
 
 ~generic_copier_ptr ()
 
 generic_copier_ptr (generic_copier_ptr< T, Copier > &&o)
 move ctor More...
 
generic_copier_ptr< T, Copier > & operator= (generic_copier_ptr< T, Copier > &&o)
 move operator More...
 
generic_copier_ptr< T, Copier > & operator= (const generic_copier_ptr< T, Copier > &o)
 copy operator More...
 
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 ()
 Releases the pointer (do not destroy the object) More...
 
void reset (T *ptr=nullptr)
 
void resetDefaultCtor ()
 

Protected Attributes

T * m_ptr
 

Member Typedef Documentation

◆ copier_t

template<typename T, typename Copier>
using mrpt::containers::internal::generic_copier_ptr< T, Copier >::copier_t = Copier

Definition at line 51 of file deepcopy_ptr.h.

◆ value_type

template<typename T, typename Copier>
using mrpt::containers::internal::generic_copier_ptr< T, Copier >::value_type = T

Definition at line 50 of file deepcopy_ptr.h.

Constructor & Destructor Documentation

◆ generic_copier_ptr() [1/4]

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::generic_copier_ptr ( T *  ptr)
inlineexplicit

Ctor from a pointer; takes ownership.

Definition at line 53 of file deepcopy_ptr.h.

◆ generic_copier_ptr() [2/4]

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::generic_copier_ptr ( )
inline

Default ctor; init to nullptr.

Definition at line 55 of file deepcopy_ptr.h.

◆ generic_copier_ptr() [3/4]

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::generic_copier_ptr ( const generic_copier_ptr< T, Copier > &  o)
inline

copy ctor: makes a copy of the object via clone()

Definition at line 57 of file deepcopy_ptr.h.

◆ ~generic_copier_ptr()

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::~generic_copier_ptr ( )
inline

Definition at line 61 of file deepcopy_ptr.h.

◆ generic_copier_ptr() [4/4]

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::generic_copier_ptr ( generic_copier_ptr< T, Copier > &&  o)
inline

move ctor

Definition at line 67 of file deepcopy_ptr.h.

Member Function Documentation

◆ get() [1/2]

template<typename T, typename Copier>
T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::get ( )
inline

Definition at line 121 of file deepcopy_ptr.h.

◆ get() [2/2]

template<typename T, typename Copier>
const T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::get ( ) const
inline

Definition at line 122 of file deepcopy_ptr.h.

◆ operator bool()

template<typename T, typename Copier>
mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator bool ( ) const
inline

Definition at line 123 of file deepcopy_ptr.h.

◆ operator!()

template<typename T, typename Copier>
bool mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator! ( ) const
inline

Definition at line 124 of file deepcopy_ptr.h.

◆ operator*() [1/2]

template<typename T, typename Copier>
T& mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator* ( void  )
inline

Definition at line 106 of file deepcopy_ptr.h.

◆ operator*() [2/2]

template<typename T, typename Copier>
const T& mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator* ( void  ) const
inline

Definition at line 113 of file deepcopy_ptr.h.

◆ operator->() [1/2]

template<typename T, typename Copier>
T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator-> ( )
inline

Definition at line 91 of file deepcopy_ptr.h.

◆ operator->() [2/2]

template<typename T, typename Copier>
const T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator-> ( ) const
inline

Definition at line 98 of file deepcopy_ptr.h.

◆ operator=() [1/2]

template<typename T, typename Copier>
generic_copier_ptr<T, Copier>& mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator= ( generic_copier_ptr< T, Copier > &&  o)
inline

move operator

Definition at line 73 of file deepcopy_ptr.h.

◆ operator=() [2/2]

template<typename T, typename Copier>
generic_copier_ptr<T, Copier>& mrpt::containers::internal::generic_copier_ptr< T, Copier >::operator= ( const generic_copier_ptr< T, Copier > &  o)
inline

copy operator

Definition at line 82 of file deepcopy_ptr.h.

◆ release()

template<typename T, typename Copier>
T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::release ( )
inline

Releases the pointer (do not destroy the object)

Definition at line 126 of file deepcopy_ptr.h.

◆ reset()

template<typename T, typename Copier>
void mrpt::containers::internal::generic_copier_ptr< T, Copier >::reset ( T *  ptr = nullptr)
inline

Definition at line 133 of file deepcopy_ptr.h.

Referenced by mrpt::containers::internal::generic_copier_ptr< T >::operator=(), mrpt::containers::internal::generic_copier_ptr< T >::resetDefaultCtor(), and TEST().

Here is the caller graph for this function:

◆ resetDefaultCtor()

template<typename T, typename Copier>
void mrpt::containers::internal::generic_copier_ptr< T, Copier >::resetDefaultCtor ( )
inline

Definition at line 139 of file deepcopy_ptr.h.

Member Data Documentation

◆ m_ptr

template<typename T, typename Copier>
T* mrpt::containers::internal::generic_copier_ptr< T, Copier >::m_ptr
protected



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020