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
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 28 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 34 of file retain_ptr.h.

◆ RetainPtr() [3/7]

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

Definition at line 36 of file retain_ptr.h.

◆ RetainPtr() [4/7]

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

Definition at line 43 of file retain_ptr.h.

References Get().

Here is the call graph for this function:

◆ RetainPtr() [5/7]

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

Definition at line 47 of file retain_ptr.h.

References Leak(), and 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 53 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 59 of file retain_ptr.h.

References 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 111 of file retain_ptr.h.

◆ AsRaw()

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

Definition at line 106 of file retain_ptr.h.

References Get().

Here is the call graph for this function:

◆ Get()

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

Definition at line 122 of file retain_ptr.h.

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

Here is the caller graph for this function:

◆ Leak()

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

Definition at line 127 of file retain_ptr.h.

Referenced by RetainPtr(), and operator=().

Here is the caller graph for this function:

◆ operator bool()

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

Definition at line 147 of file retain_ptr.h.

◆ operator T*()

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

Definition at line 121 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 131 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 139 of file retain_ptr.h.

◆ operator*()

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

Definition at line 148 of file retain_ptr.h.

◆ operator->()

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

Definition at line 149 of file retain_ptr.h.

◆ operator<()

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

Definition at line 143 of file retain_ptr.h.

References 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 71 of file retain_ptr.h.

References Get(), and 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 88 of file retain_ptr.h.

References 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 79 of file retain_ptr.h.

References Leak(), and 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 98 of file retain_ptr.h.

References 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 64 of file retain_ptr.h.

References 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 130 of file retain_ptr.h.

References 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 134 of file retain_ptr.h.

References 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 115 of file retain_ptr.h.

Referenced by operator=(), operator=(), and 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 124 of file retain_ptr.h.

◆ Unleak()

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

Definition at line 128 of file retain_ptr.h.

Referenced by RetainPtr(), RetainPtr(), operator=(), and operator=().

Here is the caller graph for this function:

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