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>.
|
#include <qarraydata.h>
Public Types | |
enum | AllocationOption { Grow , KeepSize } |
enum | GrowthPosition { GrowsAtEnd , GrowsAtBeginning } |
enum | ArrayOption { ArrayOptionDefault = 0 , CapacityReserved = 0x1 } |
Public Member Functions | |
qsizetype | allocatedCapacity () noexcept |
qsizetype | constAllocatedCapacity () const noexcept |
bool | ref () noexcept |
Returns true if sharing took place. | |
bool | deref () noexcept |
Returns false if deallocation is necessary. | |
bool | isShared () const noexcept |
bool | needsDetach () noexcept |
qsizetype | detachCapacity (qsizetype newSize) const noexcept |
Static Public Member Functions | |
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * | allocate (QArrayData **pdata, qsizetype objectSize, qsizetype alignment, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept |
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * | allocate1 (QArrayData **pdata, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept |
static Q_DECL_MALLOCLIKE Q_CORE_EXPORT void * | allocate2 (QArrayData **pdata, qsizetype capacity, AllocationOption option=QArrayData::KeepSize) noexcept |
static Q_CORE_EXPORT std::pair< QArrayData *, void * > | reallocateUnaligned (QArrayData *data, void *dataPointer, qsizetype objectSize, qsizetype newCapacity, AllocationOption option) noexcept |
static Q_CORE_EXPORT void | deallocate (QArrayData *data, qsizetype objectSize, qsizetype alignment) noexcept |
Public Attributes | |
QBasicAtomicInt | ref_ |
ArrayOptions | flags |
qsizetype | alloc |
Definition at line 24 of file qarraydata.h.
Enumerator | |
---|---|
Grow | |
KeepSize |
Definition at line 26 of file qarraydata.h.
Enumerator | |
---|---|
ArrayOptionDefault | |
CapacityReserved | the capacity was reserved by the user, try to keep it |
Definition at line 36 of file qarraydata.h.
Enumerator | |
---|---|
GrowsAtEnd | |
GrowsAtBeginning |
Definition at line 31 of file qarraydata.h.
|
staticnoexcept |
Definition at line 193 of file qarraydata.cpp.
References alignment, allocateHelper(), capacity, and Q_ASSERT.
Referenced by QTypedArrayData< T >::allocate().
|
staticnoexcept |
Definition at line 207 of file qarraydata.cpp.
References allocateHelper(), capacity, and Q_ASSERT.
|
staticnoexcept |
Definition at line 216 of file qarraydata.cpp.
References allocateHelper(), capacity, and Q_ASSERT.
|
inlinenoexcept |
Definition at line 46 of file qarraydata.h.
References alloc.
|
inlinenoexcept |
Definition at line 51 of file qarraydata.h.
References alloc.
Referenced by detachCapacity().
|
staticnoexcept |
Definition at line 254 of file qarraydata.cpp.
References alignment, Q_ASSERT, and Q_UNUSED.
Referenced by QTypedArrayData< T >::deallocate().
|
inlinenoexcept |
Returns false if deallocation is necessary.
Definition at line 64 of file qarraydata.h.
References QBasicAtomicInteger< T >::deref(), and ref_.
Referenced by QStringHashNode::~QStringHashNode().
Definition at line 82 of file qarraydata.h.
References CapacityReserved, and constAllocatedCapacity().
|
inlinenoexcept |
Definition at line 69 of file qarraydata.h.
References QBasicAtomicInteger< T >::loadRelaxed(), and ref_.
|
inlinenoexcept |
Definition at line 77 of file qarraydata.h.
References QBasicAtomicInteger< T >::loadRelaxed(), and ref_.
|
staticnoexcept |
Definition at line 226 of file qarraydata.cpp.
References calculateBlockSize(), capacity, header(), headerSize, Q_ASSERT, and Q_UNLIKELY.
Referenced by QTypedArrayData< T >::reallocateUnaligned().
|
inlinenoexcept |
Returns true if sharing took place.
Definition at line 57 of file qarraydata.h.
References QBasicAtomicInteger< T >::ref(), and ref_.
Referenced by QStringHashNode::QStringHashNode(), QStringHashNode::QStringHashNode(), QStringHash< T >::initializeNode(), and QStringHashNode::key().
qsizetype QArrayData::alloc |
Definition at line 44 of file qarraydata.h.
Referenced by allocatedCapacity(), and constAllocatedCapacity().
ArrayOptions QArrayData::flags |
Definition at line 43 of file qarraydata.h.
QBasicAtomicInt QArrayData::ref_ |
Definition at line 42 of file qarraydata.h.
Referenced by deref(), isShared(), needsDetach(), and ref().