![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore More...
#include <qiterable.h>
Public Member Functions | |
template<class T > | |
QIterable (const Container &metaContainer, const T *p) | |
template<class T > | |
QIterable (const Container &metaContainer, T *p) | |
template<typename Pointer > | |
QIterable (const Container &metaContainer, Pointer iterable) | |
QIterable (const Container &metaContainer, qsizetype alignment, const void *p) | |
QIterable (const Container &metaContainer, qsizetype alignment, void *p) | |
bool | canInputIterate () const |
Returns whether the container has an input iterator. | |
bool | canForwardIterate () const |
Returns whether it is possible to iterate over the container in forward direction. | |
bool | canReverseIterate () const |
Returns whether it is possible to iterate over the container in reverse. | |
bool | canRandomAccessIterate () const |
Returns whether it is possible to efficiently skip over multiple values using and iterator. | |
const void * | constIterable () const |
void * | mutableIterable () |
QConstIterator< Container > | constBegin () const |
Returns a QConstIterator for the beginning of the container. | |
QConstIterator< Container > | constEnd () const |
Returns a Qterable::QConstIterator for the end of the container. | |
QIterator< Container > | mutableBegin () |
Returns a QIterator for the beginning of the container. | |
QIterator< Container > | mutableEnd () |
Returns a QSequentialIterable::iterator for the end of the container. | |
qsizetype | size () const |
Returns the number of values in the container. | |
Container | metaContainer () const |
Protected Attributes | |
uint | m_revision = 0 |
QtPrivate::QConstPreservingPointer< void, quint16 > | m_iterable |
Container | m_metaContainer |
Friends | |
class | QBaseIterator< Container > |
\inmodule QtCore
QIterable is a template class that is the base class for QSequentialIterable and QAssociativeIterable.
Definition at line 407 of file qiterable.h.
|
inline |
Definition at line 418 of file qiterable.h.
|
inline |
Definition at line 424 of file qiterable.h.
|
inline |
Definition at line 430 of file qiterable.h.
|
inline |
Definition at line 435 of file qiterable.h.
|
inline |
Definition at line 440 of file qiterable.h.
|
inline |
Returns whether it is possible to iterate over the container in forward direction.
This corresponds to the std::forward_iterator_tag iterator trait of the iterator and const_iterator of the container.
Definition at line 450 of file qiterable.h.
References QIterable< Container >::m_metaContainer.
|
inline |
Returns whether the container has an input iterator.
This corresponds to the std::input_iterator_tag iterator trait of the iterator and const_iterator of the container.
Definition at line 445 of file qiterable.h.
References QIterable< Container >::m_metaContainer.
|
inline |
Returns whether it is possible to efficiently skip over multiple values using and iterator.
This corresponds to the std::random_access_iterator_tag iterator trait of the iterator and const_iterator of the container.
Definition at line 460 of file qiterable.h.
References QIterable< Container >::m_metaContainer.
Referenced by QV4::sortSequence().
|
inline |
Returns whether it is possible to iterate over the container in reverse.
This corresponds to the std::bidirectional_iterator_tag iterator trait of the const_iterator of the container.
Definition at line 455 of file qiterable.h.
References QIterable< Container >::m_metaContainer.
Referenced by QV4::sortSequence().
|
inline |
Returns a QConstIterator for the beginning of the container.
This can be used in stl-style iteration.
Definition at line 468 of file qiterable.h.
References QIterable< Container >::constIterable(), and QIterable< Container >::m_metaContainer.
Referenced by QAssociativeIterable::constBegin(), and QSequentialIterable::constBegin().
|
inline |
Returns a Qterable::QConstIterator for the end of the container.
This can be used in stl-style iteration.
Definition at line 473 of file qiterable.h.
References QIterable< Container >::constIterable(), and QIterable< Container >::m_metaContainer.
Referenced by QAssociativeIterable::constEnd(), and QSequentialIterable::constEnd().
Definition at line 465 of file qiterable.h.
References QtPrivate::QConstPreservingPointer< Type, Storage >::constPointer(), and QIterable< Container >::m_iterable.
Referenced by QIterable< Container >::constBegin(), QIterable< Container >::constEnd(), iterateQObjectContainer(), and QIterable< Container >::size().
|
inline |
Definition at line 504 of file qiterable.h.
References QIterable< Container >::m_metaContainer.
Referenced by QV4::ExecutionEngine::fromData(), QV4::SequencePrototype::fromVariant(), iterateQObjectContainer(), QQmlListAccessor::setList(), and QQmlPropertyPrivate::write().
|
inline |
Returns a QIterator for the beginning of the container.
This can be used in stl-style iteration.
Definition at line 478 of file qiterable.h.
References QIterable< Container >::m_metaContainer, and QIterable< Container >::mutableIterable().
Referenced by QAssociativeIterable::mutableBegin(), and QSequentialIterable::mutableBegin().
|
inline |
Returns a QSequentialIterable::iterator for the end of the container.
This can be used in stl-style iteration.
Definition at line 483 of file qiterable.h.
References QIterable< Container >::m_metaContainer, and QIterable< Container >::mutableIterable().
Referenced by QAssociativeIterable::mutableEnd(), and QSequentialIterable::mutableEnd().
Definition at line 466 of file qiterable.h.
References QIterable< Container >::m_iterable, and QtPrivate::QConstPreservingPointer< Type, Storage >::mutablePointer().
Referenced by QIterable< Container >::mutableBegin(), QIterable< Container >::mutableEnd(), QIterator< Container >::operator+(), QIterator< Container >::operator++(), QIterator< Container >::operator-(), QIterator< Container >::operator--(), and QQmlPropertyPrivate::write().
|
inline |
Returns the number of values in the container.
Definition at line 488 of file qiterable.h.
References begin(), QIterable< Container >::constIterable(), QIterable< Container >::m_metaContainer, and QIterable< Container >::size().
Referenced by QIterable< Container >::size().
|
friend |
Definition at line 400 of file qiterable.h.
|
protected |
Definition at line 413 of file qiterable.h.
Referenced by QIterable< Container >::constIterable(), and QIterable< Container >::mutableIterable().
|
protected |
Definition at line 414 of file qiterable.h.
Referenced by QIterable< Container >::canForwardIterate(), QIterable< Container >::canInputIterate(), QIterable< Container >::canRandomAccessIterate(), QIterable< Container >::canReverseIterate(), QIterable< Container >::constBegin(), QIterable< Container >::constEnd(), QIterable< Container >::metaContainer(), QIterable< Container >::mutableBegin(), QIterable< Container >::mutableEnd(), and QIterable< Container >::size().
Definition at line 412 of file qiterable.h.