Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fxcrt::RetainPtr< T > Class Template Reference

#include <retain_ptr.h>

+ Collaboration diagram for fxcrt::RetainPtr< T >:

Public Member Functions

 RetainPtr () noexcept=default
 
 RetainPtr (std::nullptr_t ptr)
 
 RetainPtr (T *pObj) noexcept
 
 RetainPtr (const RetainPtr &that) noexcept
 
 RetainPtr (RetainPtr &&that) noexcept
 
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
 RetainPtr (const RetainPtr< U > &that)
 
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
 RetainPtr (RetainPtr< U > &&that) noexcept
 
RetainPtroperator= (std::nullptr_t) noexcept
 
RetainPtroperator= (const RetainPtr &that)
 
RetainPtroperator= (RetainPtr &&that) noexcept
 
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
RetainPtroperator= (const RetainPtr< U > &that)
 
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
RetainPtroperator= (RetainPtr< U > &&that) noexcept
 
 ~RetainPtr ()=default
 
template<class U >
U * AsRaw () const
 
template<class U >
RetainPtr< U > As () const
 
void Reset (T *obj=nullptr)
 
 operator T* () const noexcept
 
T * Get () const noexcept
 
UnownedPtr< T > BackPointer () const
 
void Swap (RetainPtr &that)
 
T * Leak ()
 
void Unleak (T *ptr)
 
bool operator== (const RetainPtr &that) const
 
bool operator!= (const RetainPtr &that) const
 
template<typename U >
bool operator== (const U &that) const
 
template<typename U >
bool operator!= (const U &that) const
 
bool operator< (const RetainPtr &that) const
 
 operator bool () const
 
T & operator* () const
 
T * operator-> () const
 

Detailed Description

template<class T>
class fxcrt::RetainPtr< T >

Definition at line 29 of file retain_ptr.h.

Constructor & Destructor Documentation

◆ RetainPtr() [1/7]

template<class T >
fxcrt::RetainPtr< T >::RetainPtr ( )
defaultnoexcept

◆ RetainPtr() [2/7]

template<class T >
fxcrt::RetainPtr< T >::RetainPtr ( std::nullptr_t ptr)
inline

Definition at line 35 of file retain_ptr.h.

◆ RetainPtr() [3/7]

template<class T >
fxcrt::RetainPtr< T >::RetainPtr ( T * pObj)
inlineexplicitnoexcept

Definition at line 37 of file retain_ptr.h.

◆ RetainPtr() [4/7]

template<class T >
fxcrt::RetainPtr< T >::RetainPtr ( const RetainPtr< T > & that)
inlinenoexcept

Definition at line 44 of file retain_ptr.h.

◆ RetainPtr() [5/7]

template<class T >
fxcrt::RetainPtr< T >::RetainPtr ( RetainPtr< T > && that)
inlinenoexcept

Definition at line 48 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Unleak().

+ Here is the call graph for this function:

◆ RetainPtr() [6/7]

template<class T >
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
fxcrt::RetainPtr< T >::RetainPtr ( const RetainPtr< U > & that)
inline

Definition at line 54 of file retain_ptr.h.

◆ RetainPtr() [7/7]

template<class T >
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
fxcrt::RetainPtr< T >::RetainPtr ( RetainPtr< U > && that)
inlinenoexcept

Definition at line 60 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Unleak().

+ Here is the call graph for this function:

◆ ~RetainPtr()

template<class T >
fxcrt::RetainPtr< T >::~RetainPtr ( )
default

Member Function Documentation

◆ As()

template<class T >
template<class U >
RetainPtr< U > fxcrt::RetainPtr< T >::As ( ) const
inline

Definition at line 112 of file retain_ptr.h.

◆ AsRaw()

template<class T >
template<class U >
U * fxcrt::RetainPtr< T >::AsRaw ( ) const
inline

Definition at line 107 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Get().

+ Here is the call graph for this function:

◆ BackPointer()

template<class T >
UnownedPtr< T > fxcrt::RetainPtr< T >::BackPointer ( ) const
inline

Definition at line 125 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Get().

+ Here is the call graph for this function:

◆ Get()

template<class T >
T * fxcrt::RetainPtr< T >::Get ( ) const
inlinenoexcept

Definition at line 123 of file retain_ptr.h.

Referenced by fxcrt::RetainPtr< T >::AsRaw(), fxcrt::RetainPtr< T >::BackPointer(), fxcrt::RetainPtr< CFGAS_GEFont >::operator CFGAS_GEFont *(), fxcrt::RetainPtr< T >::operator<(), fxcrt::RetainPtr< T >::operator==(), and fxcrt::RetainPtr< T >::operator==().

+ Here is the caller graph for this function:

◆ Leak()

template<class T >
T * fxcrt::RetainPtr< T >::Leak ( )
inline

Definition at line 129 of file retain_ptr.h.

◆ operator bool()

template<class T >
fxcrt::RetainPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 149 of file retain_ptr.h.

◆ operator T*()

template<class T >
fxcrt::RetainPtr< T >::operator T* ( ) const
inlinenoexcept

Definition at line 122 of file retain_ptr.h.

◆ operator!=() [1/2]

template<class T >
bool fxcrt::RetainPtr< T >::operator!= ( const RetainPtr< T > & that) const
inline

Definition at line 133 of file retain_ptr.h.

◆ operator!=() [2/2]

template<class T >
template<typename U >
bool fxcrt::RetainPtr< T >::operator!= ( const U & that) const
inline

Definition at line 141 of file retain_ptr.h.

◆ operator*()

template<class T >
T & fxcrt::RetainPtr< T >::operator* ( ) const
inline

Definition at line 150 of file retain_ptr.h.

◆ operator->()

template<class T >
T * fxcrt::RetainPtr< T >::operator-> ( ) const
inline

Definition at line 151 of file retain_ptr.h.

◆ operator<()

template<class T >
bool fxcrt::RetainPtr< T >::operator< ( const RetainPtr< T > & that) const
inline

Definition at line 145 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Get().

+ Here is the call graph for this function:

◆ operator=() [1/5]

template<class T >
RetainPtr & fxcrt::RetainPtr< T >::operator= ( const RetainPtr< T > & that)
inline

Definition at line 72 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Reset().

+ Here is the call graph for this function:

◆ operator=() [2/5]

template<class T >
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
RetainPtr & fxcrt::RetainPtr< T >::operator= ( const RetainPtr< U > & that)
inline

Definition at line 89 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Reset().

+ Here is the call graph for this function:

◆ operator=() [3/5]

template<class T >
RetainPtr & fxcrt::RetainPtr< T >::operator= ( RetainPtr< T > && that)
inlinenoexcept

Definition at line 80 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Unleak().

+ Here is the call graph for this function:

◆ operator=() [4/5]

template<class T >
template<class U , typename = typename std::enable_if< std::is_convertible<U*, T*>::value>::type>
RetainPtr & fxcrt::RetainPtr< T >::operator= ( RetainPtr< U > && that)
inlinenoexcept

Definition at line 99 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Unleak().

+ Here is the call graph for this function:

◆ operator=() [5/5]

template<class T >
RetainPtr & fxcrt::RetainPtr< T >::operator= ( std::nullptr_t )
inlinenoexcept

Definition at line 65 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Reset().

+ Here is the call graph for this function:

◆ operator==() [1/2]

template<class T >
bool fxcrt::RetainPtr< T >::operator== ( const RetainPtr< T > & that) const
inline

Definition at line 132 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Get().

+ Here is the call graph for this function:

◆ operator==() [2/2]

template<class T >
template<typename U >
bool fxcrt::RetainPtr< T >::operator== ( const U & that) const
inline

Definition at line 136 of file retain_ptr.h.

References fxcrt::RetainPtr< T >::Get().

+ Here is the call graph for this function:

◆ Reset()

template<class T >
void fxcrt::RetainPtr< T >::Reset ( T * obj = nullptr)
inline

Definition at line 116 of file retain_ptr.h.

Referenced by fxcrt::RetainPtr< T >::operator=(), fxcrt::RetainPtr< T >::operator=(), and fxcrt::RetainPtr< T >::operator=().

+ Here is the caller graph for this function:

◆ Swap()

template<class T >
void fxcrt::RetainPtr< T >::Swap ( RetainPtr< T > & that)
inline

Definition at line 126 of file retain_ptr.h.

◆ Unleak()

template<class T >
void fxcrt::RetainPtr< T >::Unleak ( T * ptr)
inline

Definition at line 130 of file retain_ptr.h.

Referenced by fxcrt::RetainPtr< T >::RetainPtr(), fxcrt::RetainPtr< T >::RetainPtr(), fxcrt::RetainPtr< T >::operator=(), and fxcrt::RetainPtr< T >::operator=().

+ Here is the caller graph for this function:

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