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
QtSharedPointer::ExternalRefCountData Struct Reference

#include <qsharedpointer_impl.h>

+ Inheritance diagram for QtSharedPointer::ExternalRefCountData:
+ Collaboration diagram for QtSharedPointer::ExternalRefCountData:

Public Types

typedef void(* DestroyerFn) (ExternalRefCountData *)
 

Public Member Functions

 ExternalRefCountData (DestroyerFn d)
 
 ExternalRefCountData (Qt::Initialization)
 
 ~ExternalRefCountData ()
 
void destroy ()
 
 QT6_ONLY (Q_CORE_EXPORT void setQObjectShared(const QObject *, bool enable);) inline void checkQObjectShared(...)
 
void setQObjectShared (...)
 
voidoperator new (std::size_t)=delete
 
voidoperator new (std::size_t, void *ptr) noexcept
 
void operator delete (void *ptr)
 
void operator delete (void *, void *)
 

Static Public Member Functions

static Q_CORE_EXPORT ExternalRefCountDatagetAndRef (const QObject *)
 

Public Attributes

QBasicAtomicInt weakref
 
QBasicAtomicInt strongref
 
DestroyerFn destroyer
 

Detailed Description

Definition at line 99 of file qsharedpointer_impl.h.

Member Typedef Documentation

◆ DestroyerFn

typedef void(* QtSharedPointer::ExternalRefCountData::DestroyerFn) (ExternalRefCountData *)

Definition at line 101 of file qsharedpointer_impl.h.

Constructor & Destructor Documentation

◆ ExternalRefCountData() [1/2]

QtSharedPointer::ExternalRefCountData::ExternalRefCountData ( DestroyerFn d)
inline

Definition at line 106 of file qsharedpointer_impl.h.

References QBasicAtomicInteger< T >::storeRelaxed(), strongref, and weakref.

+ Here is the call graph for this function:

◆ ExternalRefCountData() [2/2]

QtSharedPointer::ExternalRefCountData::ExternalRefCountData ( Qt::Initialization )
inline

Definition at line 112 of file qsharedpointer_impl.h.

◆ ~ExternalRefCountData()

QtSharedPointer::ExternalRefCountData::~ExternalRefCountData ( )
inline

Definition at line 113 of file qsharedpointer_impl.h.

References QBasicAtomicInteger< T >::loadRelaxed(), Q_ASSERT, strongref, and weakref.

+ Here is the call graph for this function:

Member Function Documentation

◆ destroy()

void QtSharedPointer::ExternalRefCountData::destroy ( )
inline

Definition at line 115 of file qsharedpointer_impl.h.

References destroyer.

Referenced by QtSharedPointer::ExternalRefCountWithContiguousData< T >::create().

+ Here is the caller graph for this function:

◆ getAndRef()

QtSharedPointer::ExternalRefCountData * QtSharedPointer::ExternalRefCountData::getAndRef ( const QObject * obj)
static

Definition at line 1448 of file qsharedpointer.cpp.

References d, QObjectPrivate::get(), Q_ASSERT, Q_ASSERT_X, QBasicAtomicInteger< T >::ref(), ret, Qt::Uninitialized, and weakref.

Referenced by QV4::QV4QPointer< T >::init().

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

◆ operator delete() [1/2]

void QtSharedPointer::ExternalRefCountData::operator delete ( void * ,
void *  )
inline

Definition at line 134 of file qsharedpointer_impl.h.

◆ operator delete() [2/2]

void QtSharedPointer::ExternalRefCountData::operator delete ( void * ptr)
inline

Definition at line 133 of file qsharedpointer_impl.h.

References ptr().

+ Here is the call graph for this function:

◆ operator new() [1/2]

void * QtSharedPointer::ExternalRefCountData::operator new ( std::size_t )
inlinedelete

◆ operator new() [2/2]

void * QtSharedPointer::ExternalRefCountData::operator new ( std::size_t ,
void * ptr )
inlinenoexcept

Definition at line 132 of file qsharedpointer_impl.h.

References ptr().

+ Here is the call graph for this function:

◆ QT6_ONLY()

QtSharedPointer::ExternalRefCountData::QT6_ONLY ( Q_CORE_EXPORT void setQObjectShared(const QObject *, bool enable); )
inline

Definition at line 119 of file qsharedpointer_impl.h.

◆ setQObjectShared()

void QtSharedPointer::ExternalRefCountData::setQObjectShared ( ...)
inline

Definition at line 125 of file qsharedpointer_impl.h.

Member Data Documentation

◆ destroyer

DestroyerFn QtSharedPointer::ExternalRefCountData::destroyer

Definition at line 104 of file qsharedpointer_impl.h.

Referenced by destroy().

◆ strongref

◆ weakref


The documentation for this struct was generated from the following files: