APM:Libraries
Public Member Functions | Private Attributes | List of all members
AP_HAL::OwnPtr< T > Class Template Reference

#include <OwnPtr.h>

Collaboration diagram for AP_HAL::OwnPtr< T >:
[legend]

Public Member Functions

 OwnPtr ()
 
 OwnPtr (std::nullptr_t)
 
 OwnPtr (const OwnPtr< T > &other)=delete
 
template<typename U >
 OwnPtr (OwnPtr< U > &&other)
 
 OwnPtr (T *ptr)
 
OwnPtr< T > & operator= (std::nullptr_t)
 
template<typename U >
OwnPtr< T > & operator= (OwnPtr< U > &&other)
 
template<typename U >
OwnPtr< T > & operator= (U *other)
 
 ~OwnPtr ()
 
void clear ()
 
T * leak ()
 
T * get () const
 
T & operator* () const
 
T * operator-> () const
 
bool operator! () const
 
 operator bool () const
 

Private Attributes

T * _ptr
 

Detailed Description

template<typename T>
class AP_HAL::OwnPtr< T >

Definition at line 40 of file OwnPtr.h.

Constructor & Destructor Documentation

◆ OwnPtr() [1/5]

template<typename T>
AP_HAL::OwnPtr< T >::OwnPtr ( )
inline

Definition at line 42 of file OwnPtr.h.

Referenced by AP_HAL::OwnPtr< SerialDevice >::OwnPtr().

Here is the caller graph for this function:

◆ OwnPtr() [2/5]

template<typename T>
AP_HAL::OwnPtr< T >::OwnPtr ( std::nullptr_t  )
inline

Definition at line 43 of file OwnPtr.h.

◆ OwnPtr() [3/5]

template<typename T>
AP_HAL::OwnPtr< T >::OwnPtr ( const OwnPtr< T > &  other)
delete

◆ OwnPtr() [4/5]

template<typename T>
template<typename U >
AP_HAL::OwnPtr< T >::OwnPtr ( OwnPtr< U > &&  other)
inline

Definition at line 50 of file OwnPtr.h.

◆ OwnPtr() [5/5]

template<typename T>
AP_HAL::OwnPtr< T >::OwnPtr ( T *  ptr)
inline

Definition at line 52 of file OwnPtr.h.

◆ ~OwnPtr()

template<typename T>
AP_HAL::OwnPtr< T >::~OwnPtr ( )
inline

Definition at line 74 of file OwnPtr.h.

Member Function Documentation

◆ clear()

template<typename T>
void AP_HAL::OwnPtr< T >::clear ( )
inline

Definition at line 76 of file OwnPtr.h.

Referenced by AP_HAL::OwnPtr< SerialDevice >::operator=(), and TEST().

Here is the caller graph for this function:

◆ get()

template<typename T>
T* AP_HAL::OwnPtr< T >::get ( ) const
inline

Definition at line 88 of file OwnPtr.h.

Referenced by AP_HAL::operator!=(), AP_HAL::operator==(), sdcard_init(), Linux::UARTDriver::set_device_path(), and TEST().

Here is the caller graph for this function:

◆ leak()

template<typename T>
T* AP_HAL::OwnPtr< T >::leak ( )
inline

Definition at line 81 of file OwnPtr.h.

Referenced by AP_HAL::OwnPtr< SerialDevice >::clear(), and AP_HAL::OwnPtr< SerialDevice >::operator=().

Here is the caller graph for this function:

◆ operator bool()

template<typename T>
AP_HAL::OwnPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 96 of file OwnPtr.h.

◆ operator!()

template<typename T>
bool AP_HAL::OwnPtr< T >::operator! ( ) const
inline

Definition at line 95 of file OwnPtr.h.

◆ operator*()

template<typename T>
T& AP_HAL::OwnPtr< T >::operator* ( ) const
inline

Definition at line 93 of file OwnPtr.h.

◆ operator->()

template<typename T>
T* AP_HAL::OwnPtr< T >::operator-> ( ) const
inline

Definition at line 94 of file OwnPtr.h.

◆ operator=() [1/3]

template<typename T>
OwnPtr<T>& AP_HAL::OwnPtr< T >::operator= ( std::nullptr_t  )
inline

Definition at line 54 of file OwnPtr.h.

◆ operator=() [2/3]

template<typename T>
template<typename U >
OwnPtr<T>& AP_HAL::OwnPtr< T >::operator= ( OwnPtr< U > &&  other)
inline

Definition at line 57 of file OwnPtr.h.

◆ operator=() [3/3]

template<typename T>
template<typename U >
OwnPtr<T>& AP_HAL::OwnPtr< T >::operator= ( U *  other)
inline

Definition at line 66 of file OwnPtr.h.

Member Data Documentation

◆ _ptr

template<typename T>
T* AP_HAL::OwnPtr< T >::_ptr
private

The documentation for this class was generated from the following file: