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::ObservedPtr< T > Class Template Referencefinal

#include <observed_ptr.h>

+ Inheritance diagram for fxcrt::ObservedPtr< T >:
+ Collaboration diagram for fxcrt::ObservedPtr< T >:

Public Member Functions

 ObservedPtr ()=default
 
 ObservedPtr (T *pObservable)
 
 ObservedPtr (const ObservedPtr &that)
 
 ~ObservedPtr () override
 
void Reset (T *pObservable=nullptr)
 
void OnObservableDestroyed () override
 
bool HasObservable () const
 
ObservedPtroperator= (const ObservedPtr &that)
 
bool operator== (const ObservedPtr &that) const
 
bool operator!= (const ObservedPtr &that) const
 
template<typename U >
bool operator== (const U *that) const
 
template<typename U >
bool operator!= (const U *that) const
 
 operator bool () const
 
T * Get () const
 
T & operator* () const
 
T * operator-> () const
 
- Public Member Functions inherited from fxcrt::Observable::ObserverIface
virtual ~ObserverIface ()=default
 

Detailed Description

template<typename T>
class fxcrt::ObservedPtr< T >

Definition at line 46 of file observed_ptr.h.

Constructor & Destructor Documentation

◆ ObservedPtr() [1/3]

template<typename T >
fxcrt::ObservedPtr< T >::ObservedPtr ( )
default

◆ ObservedPtr() [2/3]

template<typename T >
fxcrt::ObservedPtr< T >::ObservedPtr ( T * pObservable)
inlineexplicit

Definition at line 49 of file observed_ptr.h.

◆ ObservedPtr() [3/3]

template<typename T >
fxcrt::ObservedPtr< T >::ObservedPtr ( const ObservedPtr< T > & that)
inline

Definition at line 53 of file observed_ptr.h.

◆ ~ObservedPtr()

template<typename T >
fxcrt::ObservedPtr< T >::~ObservedPtr ( )
inlineoverride

Definition at line 54 of file observed_ptr.h.

Member Function Documentation

◆ Get()

template<typename T >
T * fxcrt::ObservedPtr< T >::Get ( ) const
inline

Definition at line 90 of file observed_ptr.h.

Referenced by fxcrt::ObservedPtr< T >::operator==().

+ Here is the caller graph for this function:

◆ HasObservable()

template<typename T >
bool fxcrt::ObservedPtr< T >::HasObservable ( ) const
inline

Definition at line 69 of file observed_ptr.h.

Referenced by fxcrt::ObservedPtr< T >::operator bool().

+ Here is the caller graph for this function:

◆ OnObservableDestroyed()

template<typename T >
void fxcrt::ObservedPtr< T >::OnObservableDestroyed ( )
inlineoverridevirtual

Implements fxcrt::Observable::ObserverIface.

Definition at line 65 of file observed_ptr.h.

◆ operator bool()

template<typename T >
fxcrt::ObservedPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 89 of file observed_ptr.h.

References fxcrt::ObservedPtr< T >::HasObservable().

+ Here is the call graph for this function:

◆ operator!=() [1/2]

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

Definition at line 77 of file observed_ptr.h.

◆ operator!=() [2/2]

template<typename T >
template<typename U >
bool fxcrt::ObservedPtr< T >::operator!= ( const U * that) const
inline

Definition at line 85 of file observed_ptr.h.

◆ operator*()

template<typename T >
T & fxcrt::ObservedPtr< T >::operator* ( ) const
inline

Definition at line 91 of file observed_ptr.h.

◆ operator->()

template<typename T >
T * fxcrt::ObservedPtr< T >::operator-> ( ) const
inline

Definition at line 92 of file observed_ptr.h.

◆ operator=()

template<typename T >
ObservedPtr & fxcrt::ObservedPtr< T >::operator= ( const ObservedPtr< T > & that)
inline

Definition at line 70 of file observed_ptr.h.

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

+ Here is the call graph for this function:

◆ operator==() [1/2]

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

Definition at line 74 of file observed_ptr.h.

◆ operator==() [2/2]

template<typename T >
template<typename U >
bool fxcrt::ObservedPtr< T >::operator== ( const U * that) const
inline

Definition at line 80 of file observed_ptr.h.

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

+ Here is the call graph for this function:

◆ Reset()

template<typename T >
void fxcrt::ObservedPtr< T >::Reset ( T * pObservable = nullptr)
inline

Definition at line 58 of file observed_ptr.h.

Referenced by fxcrt::ObservedPtr< T >::operator=().

+ Here is the caller graph for this function:

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