![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\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 QMetaSequence::Iterable::iterator for the end of the container. | |
| qsizetype | size () const |
| Returns the number of values in the container. | |
| void | clear () |
| Clears 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 QMetaSequence::Iterable and QMetaAssociation::Iterable.
QIterable<Container> provides a common interface for iterating over containers through QVariant, where Container is the meta-type descriptor (either QMetaSequence or QMetaAssociation) that defines the container's iteration capabilities.
Definition at line 419 of file qiterable.h.
|
inline |
Definition at line 430 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 436 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 442 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 447 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 452 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
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 462 of file qiterable.h.
References 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 457 of file qiterable.h.
References 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 472 of file qiterable.h.
References m_metaContainer.
|
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 467 of file qiterable.h.
References m_metaContainer.
Clears the container.
Definition at line 525 of file qiterable.h.
References m_metaContainer, and mutableIterable().
|
inline |
Returns a QConstIterator for the beginning of the container.
This can be used in stl-style iteration.
Definition at line 480 of file qiterable.h.
References constIterable(), and m_metaContainer.
|
inline |
Returns a Qterable::QConstIterator for the end of the container.
This can be used in stl-style iteration.
Definition at line 485 of file qiterable.h.
References constIterable(), and m_metaContainer.
Definition at line 477 of file qiterable.h.
Referenced by constBegin(), constEnd(), and size().
|
inline |
Definition at line 530 of file qiterable.h.
References m_metaContainer.
Returns a QIterator for the beginning of the container.
This can be used in stl-style iteration.
Definition at line 490 of file qiterable.h.
References m_metaContainer, and mutableIterable().
Returns a QMetaSequence::Iterable::iterator for the end of the container.
This can be used in stl-style iteration.
Definition at line 495 of file qiterable.h.
References m_metaContainer, and mutableIterable().
Definition at line 478 of file qiterable.h.
Referenced by clear(), mutableBegin(), and mutableEnd().
Returns the number of values in the container.
Definition at line 500 of file qiterable.h.
References constIterable(), QtPrivate::IterableSize, m_metaContainer, and QtPrivate::warnSynthesizedIterableAccess().
|
friend |
Definition at line 412 of file qiterable.h.
|
protected |
Definition at line 425 of file qiterable.h.
|
protected |
Definition at line 426 of file qiterable.h.
Referenced by QIterable(), QIterable(), QIterable(), QIterable(), QIterable(), canForwardIterate(), canInputIterate(), canRandomAccessIterate(), canReverseIterate(), clear(), constBegin(), constEnd(), metaContainer(), mutableBegin(), mutableEnd(), and size().
Definition at line 424 of file qiterable.h.