Qt 6.x
The Qt SDK
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)
 
bool operator!= (const QQmlRefPointer &a, const QQmlRefPointer &b)
 

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 158 of file qqmlrefcount_p.h.

◆ QQmlRefPointer() [2/4]

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

Definition at line 164 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 172 of file qqmlrefcount_p.h.

◆ QQmlRefPointer() [4/4]

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

Definition at line 179 of file qqmlrefcount_p.h.

◆ ~QQmlRefPointer()

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

Definition at line 185 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 216 of file qqmlrefcount_p.h.

References o, and other().

Referenced by QQmlOpenMetaObject::QQmlOpenMetaObject(), QQmlPropertyCache::createStandalone(), QQuickPropertyChangesPrivate::decodeBinding(), QQmlScriptBlob::done(), QQuickCanvasItem::loadImage(), and QQmlBoundSignal::takeExpression().

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

◆ data()

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

◆ isNull()

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

◆ 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 191 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 204 of file qqmlrefcount_p.h.

References other(), and swap().

+ Here is the call graph for this function:

◆ reset()

◆ 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.

Referenced by QV4::ResolvedTypeReference::setCompilationUnit().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 83 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.


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