Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QVarLengthArray< T, Prealloc > Class Template Reference

#include <qvarlengtharray.h>

Inheritance diagram for QVarLengthArray< T, Prealloc >:
Collaboration diagram for QVarLengthArray< T, Prealloc >:

Public Types

using size_type = typename Base::size_type
using value_type = typename Base::value_type
using pointer = typename Base::pointer
using const_pointer = typename Base::const_pointer
using reference = typename Base::reference
using const_reference = typename Base::const_reference
using difference_type = typename Base::difference_type
using iterator = typename Base::iterator
using const_iterator = typename Base::const_iterator
using reverse_iterator = typename Base::reverse_iterator
using const_reverse_iterator = typename Base::const_reverse_iterator
Public Types inherited from QVLABase< T >
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
Public Types inherited from QVLABaseBase
using size_type = qsizetype

Public Member Functions

 QVarLengthArray () noexcept
 QVarLengthArray (qsizetype size)
template<typename U = T, if_copyable< U > = true>
 QVarLengthArray (qsizetype sz, const T &v)
 QVarLengthArray (const QVarLengthArray &other)
 QVarLengthArray (QVarLengthArray &&other) noexcept(std::is_nothrow_move_constructible_v< T >)
 QVarLengthArray (std::initializer_list< T > args)
template<typename InputIterator, if_input_iterator< InputIterator > = true>
 QVarLengthArray (InputIterator first, InputIterator last)
 ~QVarLengthArray ()
QVarLengthArray< T, Prealloc > & operator= (const QVarLengthArray< T, Prealloc > &other)
QVarLengthArrayoperator= (QVarLengthArray &&other) noexcept(std::is_nothrow_move_constructible_v< T >)
QVarLengthArray< T, Prealloc > & operator= (std::initializer_list< T > list)
void removeLast ()
qsizetype count () const
qsizetype length () const
T & first ()
const T & first () const
T & last ()
const T & last () const
bool isEmpty () const
void resize (qsizetype sz)
template<typename U = T, if_copyable< U > = true>
void resize (qsizetype sz, const T &v)
void squeeze ()
void reserve (qsizetype sz)
const T & at (qsizetype idx) const
void append (const T &t)
void append (T &&t)
void append (const T *buf, qsizetype sz)
QVarLengthArray< T, Prealloc > & operator<< (const T &t)
QVarLengthArray< T, Prealloc > & operator<< (T &&t)
QVarLengthArray< T, Prealloc > & operator+= (const T &t)
QVarLengthArray< T, Prealloc > & operator+= (T &&t)
void insert (qsizetype i, T &&t)
void insert (qsizetype i, const T &t)
void insert (qsizetype i, qsizetype n, const T &t)
QVarLengthArrayassign (qsizetype n, const T &t)
template<typename InputIterator, if_input_iterator< InputIterator > = true>
QVarLengthArrayassign (InputIterator first, InputIterator last)
QVarLengthArrayassign (std::initializer_list< T > list)
const T * constData () const
auto constBegin () const -> const_iterator
const_iterator constEnd () const
iterator insert (const_iterator before, qsizetype n, const T &x)
iterator insert (const_iterator before, T &&x)
iterator insert (const_iterator before, const T &x)
void push_back (const T &t)
void push_back (T &&t)
void shrink_to_fit ()
template<typename... Args>
iterator emplace (const_iterator pos, Args &&...args)
template<typename... Args>
T & emplace_back (Args &&...args)
constexpr qsizetype max_size () const noexcept
void clear ()
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)
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
iterator erase (const_iterator begin, const_iterator end)
iterator erase (const_iterator pos)
void pop_back ()
reference front ()
const_reference front () const
reference back ()
const_reference back () const
Public Member Functions inherited from QVLABase< T >
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)
constexpr qsizetype max_size () const noexcept
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, std::forward_iterator_tag)
template<typename Iterator>
Q_OUTOFLINE_TEMPLATE void assign_impl (qsizetype prealloc, void *array, Iterator first, Iterator last, std::input_iterator_tag)
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
Public Member Functions inherited from QVLABaseBase
constexpr size_type capacity () const noexcept
constexpr size_type size () const noexcept
constexpr bool empty () const noexcept

Static Public Attributes

static constexpr qsizetype PreallocatedSize = Prealloc

Friends

template<class S, qsizetype Prealloc2>
class QVarLengthArray
template<typename U = T, qsizetype Prealloc2 = Prealloc, Qt::if_has_qt_compare_three_way< U, U > = true>
auto compareThreeWay (const QVarLengthArray &lhs, const QVarLengthArray< T, Prealloc2 > &rhs)
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_eq_result< U > operator== (const QVarLengthArray< T, Prealloc > &l, const QVarLengthArray< T, Prealloc2 > &r)
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_eq_result< U > operator!= (const QVarLengthArray< T, Prealloc > &l, const QVarLengthArray< T, Prealloc2 > &r)
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator< (const QVarLengthArray< T, Prealloc > &lhs, const QVarLengthArray< T, Prealloc2 > &rhs) noexcept(noexcept(std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end())))
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator> (const QVarLengthArray< T, Prealloc > &lhs, const QVarLengthArray< T, Prealloc2 > &rhs) noexcept(noexcept(lhs< rhs))
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator<= (const QVarLengthArray< T, Prealloc > &lhs, const QVarLengthArray< T, Prealloc2 > &rhs) noexcept(noexcept(lhs< rhs))
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator>= (const QVarLengthArray< T, Prealloc > &lhs, const QVarLengthArray< T, Prealloc2 > &rhs) noexcept(noexcept(lhs< rhs))

Additional Inherited Members

Static Public Member Functions inherited from QVLABase< T >
static constexpr qsizetype maxSize () noexcept
Protected Types inherited from QVLABaseBase
using malloced_ptr = std::unique_ptr<void, free_deleter>
Protected Member Functions inherited from QVLAStorage< sizeof(T), alignof(T), Prealloc >
 QVLAStorage ()=default
Protected Member Functions inherited from QVLABase< T >
 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, std::forward_iterator_tag)
template<typename Iterator>
void assign_impl (qsizetype prealloc, void *array, Iterator first, Iterator last, std::input_iterator_tag)
template<typename Iterator>
void assign_impl (qsizetype prealloc, void *array, Iterator first, Iterator last)
bool isValidIterator (const const_iterator &i) const
Protected Member Functions inherited from QVLABaseBase
 QVLABaseBase ()=default
Q_ALWAYS_INLINE constexpr void verify (qsizetype pos=0, qsizetype n=1) const
Protected Attributes inherited from QVLAStorage< sizeof(T), alignof(T), Prealloc >
char array [Prealloc *(Align > Size ? Align :Size)]
QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED
Protected Attributes inherited from QVLABaseBase
qsizetype a
qsizetype s
voidptr

Detailed Description

template<class T, qsizetype Prealloc>
class QVarLengthArray< T, Prealloc >

Definition at line 281 of file qvarlengtharray.h.

Member Typedef Documentation

◆ const_iterator

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::const_iterator = typename Base::const_iterator

Definition at line 314 of file qvarlengtharray.h.

◆ const_pointer

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::const_pointer = typename Base::const_pointer

Definition at line 308 of file qvarlengtharray.h.

◆ const_reference

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::const_reference = typename Base::const_reference

Definition at line 310 of file qvarlengtharray.h.

◆ const_reverse_iterator

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::const_reverse_iterator = typename Base::const_reverse_iterator

Definition at line 316 of file qvarlengtharray.h.

◆ difference_type

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::difference_type = typename Base::difference_type

Definition at line 311 of file qvarlengtharray.h.

◆ iterator

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::iterator = typename Base::iterator

Definition at line 313 of file qvarlengtharray.h.

◆ pointer

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::pointer = typename Base::pointer

Definition at line 307 of file qvarlengtharray.h.

◆ reference

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::reference = typename Base::reference

Definition at line 309 of file qvarlengtharray.h.

◆ reverse_iterator

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::reverse_iterator = typename Base::reverse_iterator

Definition at line 315 of file qvarlengtharray.h.

◆ size_type

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::size_type = typename Base::size_type

Definition at line 305 of file qvarlengtharray.h.

◆ value_type

template<class T, qsizetype Prealloc>
using QVarLengthArray< T, Prealloc >::value_type = typename Base::value_type

Definition at line 306 of file qvarlengtharray.h.

Constructor & Destructor Documentation

◆ QVarLengthArray() [1/7]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( )
inlinenoexcept

Definition at line 318 of file qvarlengtharray.h.

◆ QVarLengthArray() [2/7]

template<class T, qsizetype Prealloc>
Q_INLINE_TEMPLATE QVarLengthArray< T, Prealloc >::QVarLengthArray ( qsizetype size)
inlineexplicit

Definition at line 728 of file qvarlengtharray.h.

◆ QVarLengthArray() [3/7]

template<class T, qsizetype Prealloc>
template<typename U = T, if_copyable< U > = true>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( qsizetype sz,
const T & v )
inlineexplicit

Definition at line 330 of file qvarlengtharray.h.

◆ QVarLengthArray() [4/7]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( const QVarLengthArray< T, Prealloc > & other)
inline

Definition at line 336 of file qvarlengtharray.h.

◆ QVarLengthArray() [5/7]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( QVarLengthArray< T, Prealloc > && other)
inlinenoexcept

Definition at line 342 of file qvarlengtharray.h.

◆ QVarLengthArray() [6/7]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( std::initializer_list< T > args)
inline

Definition at line 360 of file qvarlengtharray.h.

◆ QVarLengthArray() [7/7]

template<class T, qsizetype Prealloc>
template<typename InputIterator, if_input_iterator< InputIterator > = true>
QVarLengthArray< T, Prealloc >::QVarLengthArray ( InputIterator first,
InputIterator last )
inline

Definition at line 366 of file qvarlengtharray.h.

◆ ~QVarLengthArray()

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc >::~QVarLengthArray ( )
inline

Definition at line 372 of file qvarlengtharray.h.

Member Function Documentation

◆ append() [1/3]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::append ( const T & t)
inline

Definition at line 496 of file qvarlengtharray.h.

◆ append() [2/3]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::append ( const T * buf,
qsizetype sz )
inline

Definition at line 509 of file qvarlengtharray.h.

◆ append() [3/3]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::append ( T && t)
inline

Definition at line 504 of file qvarlengtharray.h.

◆ assign() [1/3]

template<class T, qsizetype Prealloc>
template<typename InputIterator, if_input_iterator< InputIterator > = true>
QVarLengthArray & QVarLengthArray< T, Prealloc >::assign ( InputIterator first,
InputIterator last )
inline

Definition at line 533 of file qvarlengtharray.h.

◆ assign() [2/3]

template<class T, qsizetype Prealloc>
QVarLengthArray & QVarLengthArray< T, Prealloc >::assign ( qsizetype n,
const T & t )
inline

Definition at line 530 of file qvarlengtharray.h.

◆ assign() [3/3]

template<class T, qsizetype Prealloc>
QVarLengthArray & QVarLengthArray< T, Prealloc >::assign ( std::initializer_list< T > list)
inline

Definition at line 535 of file qvarlengtharray.h.

◆ at()

template<class T, qsizetype Prealloc>
const T & QVarLengthArray< T, Prealloc >::at ( qsizetype idx) const
inline

Definition at line 488 of file qvarlengtharray.h.

◆ back() [1/2]

template<class T, qsizetype Prealloc>
reference QVLABase< T >::back ( )
inline

Definition at line 132 of file qvarlengtharray.h.

◆ back() [2/2]

template<class T, qsizetype Prealloc>
const_reference QVLABase< T >::back ( ) const
inline

Definition at line 138 of file qvarlengtharray.h.

◆ begin() [1/2]

template<class T, qsizetype Prealloc>
const_iterator QVLABase< T >::begin ( ) const
inlinenoexcept

Definition at line 97 of file qvarlengtharray.h.

◆ begin() [2/2]

template<class T, qsizetype Prealloc>
iterator QVLABase< T >::begin ( )
inlinenoexcept

Definition at line 96 of file qvarlengtharray.h.

◆ cbegin()

template<class T, qsizetype Prealloc>
const_iterator QVLABase< T >::cbegin ( ) const
inlinenoexcept

Definition at line 98 of file qvarlengtharray.h.

◆ cend()

template<class T, qsizetype Prealloc>
const_iterator QVLABase< T >::cend ( ) const
inlinenoexcept

Definition at line 101 of file qvarlengtharray.h.

◆ clear()

template<class T, qsizetype Prealloc>
void QVLABase< T >::clear ( )
inline

Definition at line 182 of file qvarlengtharray.h.

◆ constBegin()

template<class T, qsizetype Prealloc>
auto QVarLengthArray< T, Prealloc >::constBegin ( ) const -> const_iterator
inline

Definition at line 572 of file qvarlengtharray.h.

◆ constData()

template<class T, qsizetype Prealloc>
const T * QVarLengthArray< T, Prealloc >::constData ( ) const
inline

Definition at line 559 of file qvarlengtharray.h.

Referenced by QVarLengthArray< QSpan< std::byte >, DefaultNumOfBuffers >::operator=().

Here is the caller graph for this function:

◆ constEnd()

template<class T, qsizetype Prealloc>
const_iterator QVarLengthArray< T, Prealloc >::constEnd ( ) const
inline

Definition at line 575 of file qvarlengtharray.h.

◆ contains()

template<class T, qsizetype Prealloc>
template<typename AT = T>
bool QVLABase< T >::contains ( const AT & t) const

◆ count()

template<class T, qsizetype Prealloc>
qsizetype QVarLengthArray< T, Prealloc >::count ( ) const
inline

Definition at line 426 of file qvarlengtharray.h.

◆ crbegin()

template<class T, qsizetype Prealloc>
const_reverse_iterator QVLABase< T >::crbegin ( ) const
inlinenoexcept

Definition at line 108 of file qvarlengtharray.h.

◆ crend()

template<class T, qsizetype Prealloc>
const_reverse_iterator QVLABase< T >::crend ( ) const
inlinenoexcept

Definition at line 111 of file qvarlengtharray.h.

◆ data() [1/2]

template<class T, qsizetype Prealloc>
const T * QVLABase< T >::data ( ) const
inlinenoexcept

Definition at line 91 of file qvarlengtharray.h.

◆ data() [2/2]

template<class T, qsizetype Prealloc>
T * QVLABase< T >::data ( )
inlinenoexcept

Definition at line 90 of file qvarlengtharray.h.

◆ emplace()

template<class T, qsizetype Prealloc>
template<typename... Args>
iterator QVarLengthArray< T, Prealloc >::emplace ( const_iterator pos,
Args &&... args )
inline

Definition at line 618 of file qvarlengtharray.h.

◆ emplace_back()

template<class T, qsizetype Prealloc>
template<typename... Args>
T & QVarLengthArray< T, Prealloc >::emplace_back ( Args &&... args)
inline

Definition at line 621 of file qvarlengtharray.h.

◆ end() [1/2]

template<class T, qsizetype Prealloc>
const_iterator QVLABase< T >::end ( ) const
inlinenoexcept

Definition at line 100 of file qvarlengtharray.h.

◆ end() [2/2]

template<class T, qsizetype Prealloc>
iterator QVLABase< T >::end ( )
inlinenoexcept

Definition at line 99 of file qvarlengtharray.h.

◆ erase() [1/2]

template<class T, qsizetype Prealloc>
Q_OUTOFLINE_TEMPLATE auto QVLABase< T >::erase ( const_iterator begin,
const_iterator end )

Definition at line 189 of file qvarlengtharray.h.

◆ erase() [2/2]

template<class T, qsizetype Prealloc>
iterator QVLABase< T >::erase ( const_iterator pos)
inline

Definition at line 190 of file qvarlengtharray.h.

◆ first() [1/2]

template<class T, qsizetype Prealloc>
T & QVarLengthArray< T, Prealloc >::first ( )
inline

Definition at line 428 of file qvarlengtharray.h.

◆ first() [2/2]

template<class T, qsizetype Prealloc>
const T & QVarLengthArray< T, Prealloc >::first ( ) const
inline

Definition at line 432 of file qvarlengtharray.h.

◆ front() [1/2]

template<class T, qsizetype Prealloc>
reference QVLABase< T >::front ( )
inline

Definition at line 120 of file qvarlengtharray.h.

◆ front() [2/2]

template<class T, qsizetype Prealloc>
const_reference QVLABase< T >::front ( ) const
inline

Definition at line 126 of file qvarlengtharray.h.

◆ indexOf()

template<class T, qsizetype Prealloc>
template<typename AT = T>
qsizetype QVLABase< T >::indexOf ( const AT & t,
qsizetype from = 0 ) const

◆ insert() [1/6]

template<class T, qsizetype Prealloc>
iterator QVarLengthArray< T, Prealloc >::insert ( const_iterator before,
const T & x )
inline

Definition at line 592 of file qvarlengtharray.h.

◆ insert() [2/6]

template<class T, qsizetype Prealloc>
iterator QVarLengthArray< T, Prealloc >::insert ( const_iterator before,
qsizetype n,
const T & x )
inline

Definition at line 589 of file qvarlengtharray.h.

◆ insert() [3/6]

template<class T, qsizetype Prealloc>
iterator QVarLengthArray< T, Prealloc >::insert ( const_iterator before,
T && x )
inline

Definition at line 591 of file qvarlengtharray.h.

◆ insert() [4/6]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::insert ( qsizetype i,
const T & t )
inline

Definition at line 966 of file qvarlengtharray.h.

◆ insert() [5/6]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::insert ( qsizetype i,
qsizetype n,
const T & t )
inline

Definition at line 970 of file qvarlengtharray.h.

◆ insert() [6/6]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::insert ( qsizetype i,
T && t )
inline

Definition at line 962 of file qvarlengtharray.h.

◆ isEmpty()

template<class T, qsizetype Prealloc>
bool QVarLengthArray< T, Prealloc >::isEmpty ( ) const
inline

Definition at line 444 of file qvarlengtharray.h.

◆ last() [1/2]

template<class T, qsizetype Prealloc>
T & QVarLengthArray< T, Prealloc >::last ( )
inline

Definition at line 436 of file qvarlengtharray.h.

◆ last() [2/2]

template<class T, qsizetype Prealloc>
const T & QVarLengthArray< T, Prealloc >::last ( ) const
inline

Definition at line 440 of file qvarlengtharray.h.

◆ lastIndexOf()

template<class T, qsizetype Prealloc>
template<typename AT = T>
qsizetype QVLABase< T >::lastIndexOf ( const AT & t,
qsizetype from = -1 ) const

◆ length()

template<class T, qsizetype Prealloc>
qsizetype QVarLengthArray< T, Prealloc >::length ( ) const
inline

Definition at line 427 of file qvarlengtharray.h.

◆ max_size()

template<class T, qsizetype Prealloc>
qsizetype QVLABase< T >::max_size ( ) const
inlineconstexprnoexcept

Definition at line 197 of file qvarlengtharray.h.

◆ operator+=() [1/2]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator+= ( const T & t)
inline

Definition at line 515 of file qvarlengtharray.h.

◆ operator+=() [2/2]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator+= ( T && t)
inline

Definition at line 517 of file qvarlengtharray.h.

◆ operator<<() [1/2]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator<< ( const T & t)
inline

Definition at line 509 of file qvarlengtharray.h.

◆ operator<<() [2/2]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator<< ( T && t)
inline

Definition at line 509 of file qvarlengtharray.h.

◆ operator=() [1/3]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator= ( const QVarLengthArray< T, Prealloc > & other)
inline

Definition at line 379 of file qvarlengtharray.h.

◆ operator=() [2/3]

template<class T, qsizetype Prealloc>
QVarLengthArray & QVarLengthArray< T, Prealloc >::operator= ( QVarLengthArray< T, Prealloc > && other)
inlinenoexcept

Definition at line 388 of file qvarlengtharray.h.

◆ operator=() [3/3]

template<class T, qsizetype Prealloc>
QVarLengthArray< T, Prealloc > & QVarLengthArray< T, Prealloc >::operator= ( std::initializer_list< T > list)
inline

Definition at line 409 of file qvarlengtharray.h.

◆ operator[]() [1/2]

template<class T, qsizetype Prealloc>
reference QVLABase< T >::operator[] ( qsizetype idx)
inline

Definition at line 159 of file qvarlengtharray.h.

◆ operator[]() [2/2]

template<class T, qsizetype Prealloc>
const_reference QVLABase< T >::operator[] ( qsizetype idx) const
inline

Definition at line 164 of file qvarlengtharray.h.

◆ pop_back()

template<class T, qsizetype Prealloc>
void QVLABase< T >::pop_back ( )
inline

Definition at line 144 of file qvarlengtharray.h.

◆ push_back() [1/2]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::push_back ( const T & t)
inline

Definition at line 604 of file qvarlengtharray.h.

◆ push_back() [2/2]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::push_back ( T && t)
inline

Definition at line 605 of file qvarlengtharray.h.

◆ rbegin() [1/2]

template<class T, qsizetype Prealloc>
const_reverse_iterator QVLABase< T >::rbegin ( ) const
inlinenoexcept

Definition at line 107 of file qvarlengtharray.h.

◆ rbegin() [2/2]

template<class T, qsizetype Prealloc>
reverse_iterator QVLABase< T >::rbegin ( )
inlinenoexcept

Definition at line 106 of file qvarlengtharray.h.

◆ remove()

template<class T, qsizetype Prealloc>
void QVLABase< T >::remove ( qsizetype i,
qsizetype n = 1 )
inline

Definition at line 174 of file qvarlengtharray.h.

◆ removeAll()

template<class T, qsizetype Prealloc>
template<typename AT = T>
qsizetype QVLABase< T >::removeAll ( const AT & t)
inline

Definition at line 176 of file qvarlengtharray.h.

◆ removeIf()

template<class T, qsizetype Prealloc>
template<typename Predicate>
qsizetype QVLABase< T >::removeIf ( Predicate pred)
inline

Definition at line 180 of file qvarlengtharray.h.

◆ removeLast()

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::removeLast ( )
inline

Definition at line 415 of file qvarlengtharray.h.

◆ removeOne()

template<class T, qsizetype Prealloc>
template<typename AT = T>
bool QVLABase< T >::removeOne ( const AT & t)
inline

Definition at line 178 of file qvarlengtharray.h.

◆ rend() [1/2]

template<class T, qsizetype Prealloc>
const_reverse_iterator QVLABase< T >::rend ( ) const
inlinenoexcept

Definition at line 110 of file qvarlengtharray.h.

◆ rend() [2/2]

template<class T, qsizetype Prealloc>
reverse_iterator QVLABase< T >::rend ( )
inlinenoexcept

Definition at line 109 of file qvarlengtharray.h.

◆ replace()

template<class T, qsizetype Prealloc>
void QVLABase< T >::replace ( qsizetype i,
const T & t )
inline

Definition at line 173 of file qvarlengtharray.h.

◆ reserve()

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::reserve ( qsizetype sz)
inline

Definition at line 461 of file qvarlengtharray.h.

◆ resize() [1/2]

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::resize ( qsizetype sz)
inline

Definition at line 445 of file qvarlengtharray.h.

◆ resize() [2/2]

template<class T, qsizetype Prealloc>
template<typename U = T, if_copyable< U > = true>
void QVarLengthArray< T, Prealloc >::resize ( qsizetype sz,
const T & v )
inline

Definition at line 449 of file qvarlengtharray.h.

◆ shrink_to_fit()

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::shrink_to_fit ( )
inline

Definition at line 616 of file qvarlengtharray.h.

◆ squeeze()

template<class T, qsizetype Prealloc>
void QVarLengthArray< T, Prealloc >::squeeze ( )
inline

Definition at line 455 of file qvarlengtharray.h.

Referenced by QVarLengthArray< QSpan< std::byte >, DefaultNumOfBuffers >::shrink_to_fit().

Here is the caller graph for this function:

◆ value() [1/2]

template<class T, qsizetype Prealloc>
Q_OUTOFLINE_TEMPLATE T QVLABase< T >::value ( qsizetype i) const

Definition at line 170 of file qvarlengtharray.h.

◆ value() [2/2]

template<class T, qsizetype Prealloc>
Q_OUTOFLINE_TEMPLATE T QVLABase< T >::value ( qsizetype i,
const T & defaultValue ) const

Definition at line 171 of file qvarlengtharray.h.

◆ QVarLengthArray

template<class T, qsizetype Prealloc>
template<class S, qsizetype Prealloc2>
friend class QVarLengthArray
friend

Definition at line 291 of file qvarlengtharray.h.

◆ compareThreeWay

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc, Qt::if_has_qt_compare_three_way< U, U > = true>
auto compareThreeWay ( const QVarLengthArray< T, Prealloc > & lhs,
const QVarLengthArray< T, Prealloc2 > & rhs )
friend

Definition at line 645 of file qvarlengtharray.h.

◆ operator!=

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_eq_result< U > operator!= ( const QVarLengthArray< T, Prealloc > & l,
const QVarLengthArray< T, Prealloc2 > & r )
friend

Definition at line 671 of file qvarlengtharray.h.

◆ operator<

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator< ( const QVarLengthArray< T, Prealloc > & lhs,
const QVarLengthArray< T, Prealloc2 > & rhs )
friend

Definition at line 677 of file qvarlengtharray.h.

◆ operator<=

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator<= ( const QVarLengthArray< T, Prealloc > & lhs,
const QVarLengthArray< T, Prealloc2 > & rhs )
friend

Definition at line 692 of file qvarlengtharray.h.

◆ operator==

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_eq_result< U > operator== ( const QVarLengthArray< T, Prealloc > & l,
const QVarLengthArray< T, Prealloc2 > & r )
friend

Definition at line 665 of file qvarlengtharray.h.

◆ operator>

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator> ( const QVarLengthArray< T, Prealloc > & lhs,
const QVarLengthArray< T, Prealloc2 > & rhs )
friend

Definition at line 686 of file qvarlengtharray.h.

◆ operator>=

template<class T, qsizetype Prealloc>
template<typename U = T, qsizetype Prealloc2 = Prealloc>
QTypeTraits::compare_lt_result< U > operator>= ( const QVarLengthArray< T, Prealloc > & lhs,
const QVarLengthArray< T, Prealloc2 > & rhs )
friend

Definition at line 700 of file qvarlengtharray.h.

Member Data Documentation

◆ PreallocatedSize

template<class T, qsizetype Prealloc>
qsizetype QVarLengthArray< T, Prealloc >::PreallocatedSize = Prealloc
staticconstexpr

Definition at line 303 of file qvarlengtharray.h.


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