Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlRefPointer< T > Class Template Reference

#include <qqmlrefcount_p.h>

+ Collaboration diagram for QQmlRefPointer< T >:

Public Types

enum  Mode { AddRef , Adopt }
 

Public Member Functions

Q_NODISCARD_CTOR QQmlRefPointer () noexcept
 
Q_NODISCARD_CTOR QQmlRefPointer (T *, Mode m=AddRef)
 
Q_NODISCARD_CTOR QQmlRefPointer (const QQmlRefPointer &)
 
Q_NODISCARD_CTOR QQmlRefPointer (QQmlRefPointer &&) noexcept
 
 ~QQmlRefPointer ()
 
void swap (QQmlRefPointer &other) noexcept
 
QQmlRefPointer< T > & operator= (const QQmlRefPointer< T > &o)
 
QQmlRefPointer< T > & operator= (QQmlRefPointer< T > &&o) noexcept
 
bool isNull () const
 
T * operator-> () const
 
T & operator* () const
 
 operator bool () const
 
T * data () const
 
QQmlRefPointer< T > & adopt (T *)
 Takes ownership of other.
 
T * take ()
 
void reset (T *t=nullptr)
 

Friends

bool operator== (const QQmlRefPointer &a, const QQmlRefPointer &b) noexcept
 
bool operator!= (const QQmlRefPointer &a, const QQmlRefPointer &b) noexcept
 
size_t qHash (const QQmlRefPointer &v, size_t seed=0) noexcept
 

Detailed Description

template<class T>
class QQmlRefPointer< T >

Definition at line 53 of file qqmlrefcount_p.h.

Member Enumeration Documentation

◆ Mode

template<class T >
enum QQmlRefPointer::Mode
Enumerator
AddRef 
Adopt 

Definition at line 56 of file qqmlrefcount_p.h.

Constructor & Destructor Documentation

◆ QQmlRefPointer() [1/4]

template<class T >
QQmlRefPointer< T >::QQmlRefPointer ( )
inlinenoexcept

Definition at line 170 of file qqmlrefcount_p.h.

◆ QQmlRefPointer() [2/4]

template<class T >
QQmlRefPointer< T >::QQmlRefPointer ( T * o,
Mode m = AddRef )
inline

Definition at line 176 of file qqmlrefcount_p.h.

References QQmlRefPointer< T >::AddRef, and o.

◆ QQmlRefPointer() [3/4]

template<class T >
QQmlRefPointer< T >::QQmlRefPointer ( const QQmlRefPointer< T > & other)
inline

Definition at line 184 of file qqmlrefcount_p.h.

◆ QQmlRefPointer() [4/4]

template<class T >
QQmlRefPointer< T >::QQmlRefPointer ( QQmlRefPointer< T > && other)
inlinenoexcept

Definition at line 191 of file qqmlrefcount_p.h.

◆ ~QQmlRefPointer()

template<class T >
QQmlRefPointer< T >::~QQmlRefPointer ( )
inline

Definition at line 197 of file qqmlrefcount_p.h.

References o.

Member Function Documentation

◆ adopt()

template<class T >
QQmlRefPointer< T > & QQmlRefPointer< T >::adopt ( T * other)
inline

Takes ownership of other.

take() does not add a reference, as it assumes ownership of the callers reference of other.

Definition at line 228 of file qqmlrefcount_p.h.

References o, and other().

Referenced by QQmlOpenMetaObject::QQmlOpenMetaObject(), QQuickPropertyChangesPrivate::decodeBinding(), QQmlScriptBlob::done(), and QQmlBoundSignal::takeExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ data()

◆ isNull()

template<class T >
bool QQmlRefPointer< T >::isNull ( ) const
inline

Definition at line 71 of file qqmlrefcount_p.h.

Referenced by QQmlXMLHttpRequest::QQmlXMLHttpRequest(), QV4::ResolvedTypeReference::addToHash(), QQmlPropertyCacheCreator< ObjectContainer >::buildMetaObjectsIncrementally(), and QQmlIncubator::clear().

+ Here is the caller graph for this function:

◆ operator bool()

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

Definition at line 75 of file qqmlrefcount_p.h.

◆ operator*()

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

Definition at line 74 of file qqmlrefcount_p.h.

◆ operator->()

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

Definition at line 73 of file qqmlrefcount_p.h.

◆ operator=() [1/2]

template<class T >
QQmlRefPointer< T > & QQmlRefPointer< T >::operator= ( const QQmlRefPointer< T > & o)
inline

Definition at line 203 of file qqmlrefcount_p.h.

References o, and other().

+ Here is the call graph for this function:

◆ operator=() [2/2]

template<class T >
QQmlRefPointer< T > & QQmlRefPointer< T >::operator= ( QQmlRefPointer< T > && o)
inlinenoexcept

Definition at line 216 of file qqmlrefcount_p.h.

References other(), and swap().

+ Here is the call graph for this function:

◆ reset()

template<class T >
void QQmlRefPointer< T >::reset ( T * t = nullptr)
inline

◆ swap()

template<class T >
void QQmlRefPointer< T >::swap ( QQmlRefPointer< T > & other)
inlinenoexcept

Definition at line 66 of file qqmlrefcount_p.h.

References other(), and qt_ptr_swap().

+ Here is the call graph for this function:

◆ take()

template<class T >
T * QQmlRefPointer< T >::take ( )
inline

Definition at line 80 of file qqmlrefcount_p.h.

Friends And Related Symbol Documentation

◆ operator!=

template<class T >
bool operator!= ( const QQmlRefPointer< T > & a,
const QQmlRefPointer< T > & b )
friend

Definition at line 87 of file qqmlrefcount_p.h.

◆ operator==

template<class T >
bool operator== ( const QQmlRefPointer< T > & a,
const QQmlRefPointer< T > & b )
friend

Definition at line 82 of file qqmlrefcount_p.h.

◆ qHash

template<class T >
size_t qHash ( const QQmlRefPointer< T > & v,
size_t seed = 0 )
friend

Definition at line 92 of file qqmlrefcount_p.h.


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