![]() |
Qt 6.x
The Qt SDK
|
#include <qvarlengtharray.h>
Inherits QVLABaseBase.
Inherited by QVarLengthArray< KeyValuePair, 8 >, QVarLengthArray< T, 8 >, QVarLengthArray< void * >, QVarLengthArray< QQmlSA::Element, 4 >, QVarLengthArray< EGLImageKHR, 3 >, QVarLengthArray< float, LUTSize >, QVarLengthArray< PerQuadData, 8 >, QVarLengthArray< QMacNotificationObserver, 3 >, QVarLengthArray< QByteArray, 4 >, QVarLengthArray< QRhiBufferData, 4 >, QVarLengthArray< QImage, 4 >, QVarLengthArray< ResId, 8 *2+1 >, QVarLengthArray< QRhiShaderResourceBinding, 8 >, QVarLengthArray< QD3D11ShaderResourceBindings::BoundResourceData, 8 >, QVarLengthArray< QRhiBatchedBindings::Batch, 4 >, QVarLengthArray< int, 4 >, QVarLengthArray< QRhiPassResourceTracker, 8 >, QVarLengthArray< QGles2UniformDescription, 8 >, QVarLengthArray< QGles2SamplerDescription, 4 >, QVarLengthArray< QRingBuffer, 2 >, QVarLengthArray< QRingBuffer, 1 >, QVarLengthArray< QMetalBufferData::BufferUpdate, 16 >, QVarLengthArray< QMetalShaderResourceBindings::BoundResourceData, 8 >, QVarLengthArray< QMetalShaderResourceBindingsData::Stage::Buffer, 8 >, QVarLengthArray< QMetalShaderResourceBindingsData::Stage::Texture, 8 >, QVarLengthArray< QMetalShaderResourceBindingsData::Stage::Sampler, 8 >, QVarLengthArray< std::array< QImage, QRhi::MAX_MIP_LEVELS >, 6 >, QVarLengthArray< GLuint, 8 >, QVarLengthArray< QOpenGLFramebufferObjectPrivate::ColorAttachment, 8 >, QVarLengthArray< QPainterPrivate *, NDPtrs >, QVarLengthArray< QQmlBindEntry, 1 >, QVarLengthArray< QQuick3DShaderUtilsShader *, 2 >, QVarLengthArray< QPointF, 16 >, QVarLengthArray< QQuickItem *, 4 >, QVarLengthArray< QQuickParticlePainter *, Prealloc >, QVarLengthArray< QQuickParticleGroupData::ID, Prealloc >, QVarLengthArray< QQuickParticleGroupData *, 32 >, QVarLengthArray< QQuickTextNodeEngine::BinaryTreeNode, 16 >, QVarLengthArray< QReadWriteLockPrivate::Reader, 16 >, QVarLengthArray< quint8, maxRectsSize >, QVarLengthArray< T, 4 >, QVarLengthArray< QRhiD3D11::TextureReadback, 2 >, QVarLengthArray< QRhiD3D11::BufferReadback, 2 >, QVarLengthArray< QRhiGraphicsPipeline::TargetBlend, 8 >, QVarLengthArray< QRhiShaderStage, 4 >, QVarLengthArray< QRhiResourceUpdateBatch *, 4 >, QVarLengthArray< QRhi::CleanupCallback, 4 >, QVarLengthArray< QRhiMetalData::TextureReadback, 2 >, QVarLengthArray< QRhiMetalData::BufferReadback, 2 >, QVarLengthArray< QRhiResourceUpdateBatchPrivate::BufferOp, BUFFER_OPS_STATIC_ALLOC >, QVarLengthArray< QRhiResourceUpdateBatchPrivate::TextureOp, TEXTURE_OPS_STATIC_ALLOC >, QVarLengthArray< MipLevelUploadList, 6 >, QVarLengthArray< QRhiShaderResourceBinding, BINDING_PREALLOC >, QVarLengthArray< QRhiColorAttachment, 8 >, QVarLengthArray< QRhiTextureUploadEntry, 16 >, QVarLengthArray< QRhiVertexInputBinding, 8 >, QVarLengthArray< QRhiVertexInputAttribute, 8 >, QVarLengthArray< QRhiVulkan::DescriptorPoolData, 8 >, QVarLengthArray< VkCommandBuffer, 4 >, QVarLengthArray< QRhiVulkan::TextureReadback, 2 >, QVarLengthArray< QRhiVulkan::BufferReadback, 2 >, QVarLengthArray< QSGBatchRenderer::Renderer::PreparedRenderBatch, 64 >, QVarLengthArray< Pipeline, 16 >, QVarLengthArray< QRhiShaderStage, 2 >, QVarLengthArray< QSGTexture *, 4 >, QVarLengthArray< QRhiSampler *, 4 >, QVarLengthArray< QSSGRenderPass *, 12 >, QVarLengthArray< QSSGShaderLight, 16 >, QVarLengthArray< QRhiTextureRenderTarget *, 6 >, QVarLengthArray< QRhiShaderResourceBindings *, 6 >, QVarLengthArray< QRhiShaderResourceBindings *, 4 >, QVarLengthArray< QSSGRenderLight *, 4 >, QVarLengthArray< InputSemantic, 8 >, QVarLengthArray< QSSGRhiShaderUniform, 32 >, QVarLengthArray< QSSGRhiShaderUniformArray, 8 >, QVarLengthArray< QSSGRhiShadowMapProperties, QSSG_MAX_NUM_SHADOW_MAPS >, QVarLengthArray< QSSGRhiTexture, 8 >, QVarLengthArray< QSSGRhiShaderPipeline::CommonUniformIndices::ImageIndices, 16 >, QVarLengthArray< Node * >, QVarLengthArray< int, 56 >, QVarLengthArray< int >, QVarLengthArray< QList< int >, MAX_FACES >, QVarLengthArray< QList< QImage >, MAX_FACES >, QVarLengthArray< QPainterPath::ElementType >, QVarLengthArray< qreal >, QVarLengthArray< QVkBuffer::DynamicUpdate, 16 >, QVarLengthArray< VkClearValue, 4 >, QVarLengthArray< VkBufferImageCopy, 16 >, QVarLengthArray< uint32_t, 4 >, QVarLengthArray< VkBuffer, 4 >, QVarLengthArray< VkDeviceSize, 4 >, QVarLengthArray< VkImageMemoryBarrier, 8 >, QVarLengthArray< VkBufferMemoryBarrier, 8 >, QVarLengthArray< VkAttachmentDescription, 8 >, QVarLengthArray< VkAttachmentReference, 8 >, QVarLengthArray< VkSubpassDependency, 2 >, QVarLengthArray< QVkShaderResourceBindings::BoundResourceData, 8 >, QVarLengthArray< VkPresentModeKHR, 8 >, QVarLengthArray< QVkSwapChain::ImageResources, EXPECTED_MAX_BUFFER_COUNT >, QVarLengthArray< int, 10 >, QVarLengthArray< const QtPrivate::QPropertyBindingData *, 8 >, and QVarLengthArray< T, Prealloc >.
Public Types | |
using | iterator = T * |
using | const_iterator = const T * |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | value_type = T |
using | reference = value_type & |
using | const_reference = const value_type & |
using | pointer = value_type * |
using | const_pointer = const value_type * |
using | difference_type = qptrdiff |
![]() | |
using | size_type = qsizetype |
Public Member Functions | |
T * | data () noexcept |
const T * | data () const noexcept |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
const_iterator | cbegin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
const_iterator | cend () const noexcept |
reverse_iterator | rbegin () noexcept |
const_reverse_iterator | rbegin () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
reverse_iterator | rend () noexcept |
const_reverse_iterator | rend () const noexcept |
const_reverse_iterator | crend () const noexcept |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
void | pop_back () |
template<typename AT = T> | |
qsizetype | indexOf (const AT &t, qsizetype from=0) const |
template<typename AT = T> | |
qsizetype | lastIndexOf (const AT &t, qsizetype from=-1) const |
template<typename AT = T> | |
bool | contains (const AT &t) const |
reference | operator[] (qsizetype idx) |
const_reference | operator[] (qsizetype idx) const |
value_type | value (qsizetype i) const |
value_type | value (qsizetype i, const T &defaultValue) const |
void | replace (qsizetype i, const T &t) |
void | remove (qsizetype i, qsizetype n=1) |
template<typename AT = T> | |
qsizetype | removeAll (const AT &t) |
template<typename AT = T> | |
bool | removeOne (const AT &t) |
template<typename Predicate > | |
qsizetype | removeIf (Predicate pred) |
void | clear () |
iterator | erase (const_iterator begin, const_iterator end) |
iterator | erase (const_iterator pos) |
size_t | hash (size_t seed) const noexcept(QtPrivate::QNothrowHashable_v< T >) |
template<typename AT > | |
Q_INLINE_TEMPLATE qsizetype | indexOf (const AT &t, qsizetype from) const |
template<typename AT > | |
Q_INLINE_TEMPLATE qsizetype | lastIndexOf (const AT &t, qsizetype from) const |
template<typename AT > | |
Q_INLINE_TEMPLATE bool | contains (const AT &t) const |
template<typename Iterator > | |
Q_OUTOFLINE_TEMPLATE void | assign_impl (qsizetype prealloc, void *array, Iterator first, Iterator last) |
template<typename... Args> | |
Q_OUTOFLINE_TEMPLATE auto | emplace_impl (qsizetype prealloc, void *array, const_iterator before, Args &&...args) -> iterator |
![]() | |
constexpr size_type | capacity () const noexcept |
constexpr size_type | size () const noexcept |
constexpr bool | empty () const noexcept |
Protected Member Functions | |
~QVLABase ()=default | |
void | growBy (qsizetype prealloc, void *array, qsizetype increment) |
template<typename... Args> | |
reference | emplace_back_impl (qsizetype prealloc, void *array, Args &&...args) |
template<typename... Args> | |
iterator | emplace_impl (qsizetype prealloc, void *array, const_iterator pos, Args &&...arg) |
iterator | insert_impl (qsizetype prealloc, void *array, const_iterator pos, qsizetype n, const T &t) |
template<typename S > | |
bool | equal (const QVLABase< S > &other) const |
template<typename S > | |
bool | less_than (const QVLABase< S > &other) const |
void | append_impl (qsizetype prealloc, void *array, const T *buf, qsizetype n) |
void | reallocate_impl (qsizetype prealloc, void *array, qsizetype size, qsizetype alloc) |
void | resize_impl (qsizetype prealloc, void *array, qsizetype sz, const T &v) |
void | resize_impl (qsizetype prealloc, void *array, qsizetype sz) |
void | assign_impl (qsizetype prealloc, void *array, qsizetype n, const T &t) |
template<typename Iterator > | |
void | assign_impl (qsizetype prealloc, void *array, Iterator first, Iterator last) |
bool | isValidIterator (const const_iterator &i) const |
![]() | |
~QVLABaseBase ()=default | |
Q_ALWAYS_INLINE constexpr void | verify (qsizetype pos=0, qsizetype n=1) const |
Additional Inherited Members | |
![]() | |
using | malloced_ptr = std::unique_ptr< void, free_deleter > |
![]() | |
qsizetype | a |
qsizetype | s |
void * | ptr |
Definition at line 78 of file qvarlengtharray.h.
using QVLABase< T >::const_iterator = const T* |
Definition at line 88 of file qvarlengtharray.h.
using QVLABase< T >::const_pointer = const value_type* |
Definition at line 111 of file qvarlengtharray.h.
using QVLABase< T >::const_reference = const value_type& |
Definition at line 109 of file qvarlengtharray.h.
using QVLABase< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 98 of file qvarlengtharray.h.
Definition at line 112 of file qvarlengtharray.h.
using QVLABase< T >::iterator = T* |
Definition at line 87 of file qvarlengtharray.h.
using QVLABase< T >::pointer = value_type* |
Definition at line 110 of file qvarlengtharray.h.
using QVLABase< T >::reference = value_type& |
Definition at line 108 of file qvarlengtharray.h.
Definition at line 97 of file qvarlengtharray.h.
using QVLABase< T >::value_type = T |
Definition at line 107 of file qvarlengtharray.h.
|
protected |
Definition at line 743 of file qvarlengtharray.h.
References capacity, QVLABase< T >::growBy(), increment(), and Q_ASSERT.
Referenced by QVarLengthArray< T, Prealloc >::append().
|
protected |
Q_OUTOFLINE_TEMPLATE void QVLABase< T >::assign_impl | ( | qsizetype | prealloc, |
void * | array, | ||
Iterator | first, | ||
Iterator | last | ||
) |
Definition at line 780 of file qvarlengtharray.h.
References begin(), capacity, QVLABase< T >::emplace_back_impl(), QVarLengthArray< T, Prealloc >::last(), and QVLABase< T >::reallocate_impl().
|
protected |
Definition at line 763 of file qvarlengtharray.h.
References capacity, erase(), Q_ASSERT, QVLABase< T >::reallocate_impl(), and QVLABase< T >::resize_impl().
Referenced by QVarLengthArray< T, Prealloc >::assign(), and QVarLengthArray< T, Prealloc >::assign().
Definition at line 126 of file qvarlengtharray.h.
References QVLABase< T >::rbegin(), and QVLABaseBase::verify().
|
inline |
Definition at line 132 of file qvarlengtharray.h.
References QVLABase< T >::rbegin(), and QVLABaseBase::verify().
|
inlinenoexcept |
Definition at line 91 of file qvarlengtharray.h.
References QVLABase< T >::data().
Definition at line 90 of file qvarlengtharray.h.
References QVLABase< T >::data().
Referenced by QVLABase< T >::cbegin(), QVLABase< T >::equal(), QVLABase< T >::front(), QVLABase< T >::front(), QVLABase< T >::hash(), QVLABase< T >::less_than(), QVLABase< T >::rend(), QVLABase< T >::rend(), and QVLABase< T >::resize_impl().
|
inlinenoexcept |
Definition at line 92 of file qvarlengtharray.h.
References QVLABase< T >::begin().
Referenced by QVLABase< T >::isValidIterator().
|
inlinenoexcept |
Definition at line 95 of file qvarlengtharray.h.
References QVLABase< T >::end().
Referenced by QVLABase< T >::isValidIterator().
Definition at line 176 of file qvarlengtharray.h.
References QVLABase< T >::data(), and QVLABaseBase::size().
Q_INLINE_TEMPLATE bool QVLABase< T >::contains | ( | const AT & | t | ) | const |
|
inlinenoexcept |
Definition at line 102 of file qvarlengtharray.h.
References QVLABase< T >::rbegin().
|
inlinenoexcept |
Definition at line 105 of file qvarlengtharray.h.
References QVLABase< T >::rend().
Definition at line 85 of file qvarlengtharray.h.
References QVLABaseBase::ptr.
Definition at line 84 of file qvarlengtharray.h.
References QVLABaseBase::ptr.
Referenced by QVLABase< T >::begin(), QVLABase< T >::begin(), QVLABase< T >::clear(), QVLABase< T >::end(), QVLABase< T >::end(), QVLABase< T >::operator[](), QVLABase< T >::operator[](), QVLABase< T >::pop_back(), QVLABase< T >::resize_impl(), and QVLABase< T >::resize_impl().
|
inlineprotected |
Definition at line 194 of file qvarlengtharray.h.
References args, QVLABaseBase::capacity(), q20::construct_at(), QVLABase< T >::end(), QVLABase< T >::growBy(), QVLABaseBase::s, and QVLABaseBase::size().
Referenced by QVLABase< T >::assign_impl(), QVarLengthArray< T, Prealloc >::emplace_back(), and QVLABase< T >::emplace_impl().
Q_OUTOFLINE_TEMPLATE auto QVLABase< T >::emplace_impl | ( | qsizetype | prealloc, |
void * | array, | ||
const_iterator | before, | ||
Args &&... | args | ||
) | -> iterator |
Definition at line 920 of file qvarlengtharray.h.
References args, begin(), capacity, QVarLengthArray< T, Prealloc >::cbegin(), e, QVLABase< T >::emplace_back_impl(), Q_ASSERT, Q_ASSERT_X, and QtPrivate::q_rotate().
|
protected |
Referenced by QVarLengthArray< T, Prealloc >::emplace().
|
inlinenoexcept |
Definition at line 94 of file qvarlengtharray.h.
References QVLABase< T >::data(), and QVLABaseBase::size().
Definition at line 93 of file qvarlengtharray.h.
References QVLABase< T >::data(), and QVLABaseBase::size().
Referenced by QVLABase< T >::cend(), QVLABase< T >::emplace_back_impl(), QVLABase< T >::equal(), QVLABase< T >::hash(), QVLABase< T >::less_than(), QVLABase< T >::rbegin(), QVLABase< T >::rbegin(), and QVLABase< T >::resize_impl().
|
inlineprotected |
Definition at line 208 of file qvarlengtharray.h.
References QVLABase< T >::begin(), QVLABase< T >::end(), and other().
Q_OUTOFLINE_TEMPLATE auto QVLABase< T >::erase | ( | const_iterator | begin, |
const_iterator | end | ||
) |
Definition at line 948 of file qvarlengtharray.h.
References begin(), QVarLengthArray< T, Prealloc >::cbegin(), Q_ASSERT, Q_ASSERT_X, and QT_MAKE_CHECKED_ARRAY_ITERATOR.
|
inline |
Definition at line 184 of file qvarlengtharray.h.
References QVLABase< T >::erase(), and pos.
Referenced by QVLABase< T >::erase().
Definition at line 114 of file qvarlengtharray.h.
References QVLABase< T >::begin(), and QVLABaseBase::verify().
|
inline |
Definition at line 120 of file qvarlengtharray.h.
References QVLABase< T >::begin(), and QVLABaseBase::verify().
|
inlineprotected |
Definition at line 191 of file qvarlengtharray.h.
References increment(), QVLABase< T >::reallocate_impl(), and QVLABaseBase::size().
Referenced by QVLABase< T >::append_impl(), and QVLABase< T >::emplace_back_impl().
|
inlinenoexcept |
Definition at line 186 of file qvarlengtharray.h.
References QVLABase< T >::begin(), QVLABase< T >::end(), qHashRange(), and seed.
Q_INLINE_TEMPLATE qsizetype QVLABase< T >::indexOf | ( | const AT & | t, |
qsizetype | from | ||
) | const |
qsizetype QVLABase< T >::indexOf | ( | const AT & | t, |
qsizetype | from = 0 |
||
) | const |
|
protected |
Definition at line 935 of file qvarlengtharray.h.
References begin(), QVarLengthArray< T, Prealloc >::cbegin(), e, Q_ASSERT_X, QtPrivate::q_rotate(), and QVLABase< T >::resize_impl().
Referenced by QVarLengthArray< T, Prealloc >::insert().
|
inlineprotected |
Definition at line 250 of file qvarlengtharray.h.
References QVLABase< T >::cbegin(), QVLABase< T >::cend(), and i.
Q_INLINE_TEMPLATE qsizetype QVLABase< T >::lastIndexOf | ( | const AT & | t, |
qsizetype | from | ||
) | const |
Definition at line 712 of file qvarlengtharray.h.
References begin().
qsizetype QVLABase< T >::lastIndexOf | ( | const AT & | t, |
qsizetype | from = -1 |
||
) | const |
|
inlineprotected |
Definition at line 213 of file qvarlengtharray.h.
References QVLABase< T >::begin(), QVLABase< T >::end(), and other().
Definition at line 153 of file qvarlengtharray.h.
References QVLABase< T >::data(), and QVLABaseBase::verify().
Referenced by QVarLengthArray< T, Prealloc >::at(), QVLABase< T >::value(), and QVLABase< T >::value().
|
inline |
Definition at line 158 of file qvarlengtharray.h.
References QVLABase< T >::data(), and QVLABaseBase::verify().
Definition at line 138 of file qvarlengtharray.h.
References QVLABase< T >::data(), QVLABaseBase::s, QVLABaseBase::size(), and QVLABaseBase::verify().
Referenced by QVarLengthArray< T, Prealloc >::removeLast().
|
inlinenoexcept |
Definition at line 101 of file qvarlengtharray.h.
References QVLABase< T >::end().
|
inlinenoexcept |
Definition at line 100 of file qvarlengtharray.h.
References QVLABase< T >::end().
Referenced by QVLABase< T >::back(), QVLABase< T >::back(), and QVLABase< T >::crbegin().
|
protected |
Definition at line 818 of file qvarlengtharray.h.
References capacity, ptr(), Q_ASSERT, Q_CHECK_PTR(), QtPrivate::q_uninitialized_relocate_n(), and qMin().
Referenced by QVLABase< T >::assign_impl(), QVLABase< T >::assign_impl(), QVLABase< T >::growBy(), QVLABase< T >::resize_impl(), and QVLABase< T >::resize_impl().
Definition at line 887 of file qvarlengtharray.h.
References begin(), erase(), i, and QVLABaseBase::verify().
Definition at line 892 of file qvarlengtharray.h.
References QtPrivate::sequential_erase_with_copy().
|
inline |
Definition at line 900 of file qvarlengtharray.h.
References QtPrivate::sequential_erase_if().
Definition at line 896 of file qvarlengtharray.h.
References QtPrivate::sequential_erase_one().
|
inlinenoexcept |
Definition at line 104 of file qvarlengtharray.h.
References QVLABase< T >::begin().
|
inlinenoexcept |
Definition at line 103 of file qvarlengtharray.h.
References QVLABase< T >::begin().
Referenced by QVLABase< T >::crend().
Definition at line 912 of file qvarlengtharray.h.
References i, and QVLABaseBase::verify().
|
inlineprotected |
Definition at line 232 of file qvarlengtharray.h.
References QVLABaseBase::capacity(), q20::construct_at(), QVLABase< T >::data(), qMax(), QVLABase< T >::reallocate_impl(), QVLABaseBase::s, and QVLABaseBase::size().
|
inlineprotected |
Definition at line 220 of file qvarlengtharray.h.
References QVLABase< T >::begin(), QVLABaseBase::capacity(), q20::construct_at(), QVLABase< T >::data(), QVLABase< T >::end(), QtPrivate::q_points_into_range(), qMax(), QVLABase< T >::reallocate_impl(), QVLABase< T >::resize_impl(), QVLABaseBase::s, and QVLABaseBase::size().
Referenced by QVLABase< T >::assign_impl(), QVLABase< T >::insert_impl(), QVarLengthArray< T, Prealloc >::resize(), QVarLengthArray< T, Prealloc >::resize(), and QVLABase< T >::resize_impl().
Definition at line 862 of file qvarlengtharray.h.
References i, and QVLABase< T >::operator[]().
Q_OUTOFLINE_TEMPLATE T QVLABase< T >::value | ( | qsizetype | i, |
const T & | defaultValue | ||
) | const |
Definition at line 869 of file qvarlengtharray.h.
References i, and QVLABase< T >::operator[]().