![]() |
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 418 of file qiterable.h.
|
inline |
Definition at line 429 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 435 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 441 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 446 of file qiterable.h.
References QIterable(), and m_metaContainer.
Referenced by QIterable().
|
inline |
Definition at line 451 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 461 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 456 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 471 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 466 of file qiterable.h.
References m_metaContainer.
Clears the container.
Definition at line 524 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 479 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 484 of file qiterable.h.
References constIterable(), and m_metaContainer.
Definition at line 476 of file qiterable.h.
Referenced by constBegin(), constEnd(), and size().
|
inline |
Definition at line 529 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 489 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 494 of file qiterable.h.
References m_metaContainer, and mutableIterable().
Definition at line 477 of file qiterable.h.
Referenced by clear(), mutableBegin(), and mutableEnd().
Returns the number of values in the container.
Definition at line 499 of file qiterable.h.
References constIterable(), QtPrivate::IterableSize, m_metaContainer, and QtPrivate::warnSynthesizedIterableAccess().
|
friend |
Definition at line 411 of file qiterable.h.
|
protected |
Definition at line 424 of file qiterable.h.
|
protected |
Definition at line 425 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 423 of file qiterable.h.