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
QSequentialIterator Class Reference

#include <qsequentialiterable.h>

Inheritance diagram for QSequentialIterator:
Collaboration diagram for QSequentialIterator:

Public Types

using value_type = QVariant
using reference = QVariantRef<QSequentialIterator>
using pointer = QVariantPointer<QSequentialIterator>
Public Types inherited from QIterator< QMetaSequence >
using difference_type

Public Member Functions

 QSequentialIterator (QIterator &&it)
QVariantRef< QSequentialIteratoroperator* () const
 \typealias QSequentialIterable::const_iterator
QVariantPointer< QSequentialIteratoroperator-> () const
 Returns the current item, converted to a QVariantPointer.
Public Member Functions inherited from QIterator< QMetaSequence >
 QIterator (QIterable< QMetaSequence > *iterable, void *iterator)
 Creates an iterator from an iterable and a pointer to a native iterator.
bool operator== (const QIterator &o) const
 Returns true if other points to the same item as this iterator; otherwise returns false.
bool operator!= (const QIterator &o) const
 Returns true if other points to a different item than this iterator; otherwise returns false.
QIteratoroperator++ ()
 The prefix {++} operator ({++it}) advances the iterator to the next item in the container and returns an iterator to the new current item.
QIteratoroperator-- ()
 The prefix {–} operator ({–it}) makes the preceding item current and returns an iterator to the new current item.
QIteratoroperator+= (qsizetype j)
 Advances the iterator by j items.
QIteratoroperator-= (qsizetype j)
 Makes the iterator go back by j items.
QIterator operator+ (qsizetype j) const
 Returns an iterator to the item at j positions forward from this iterator.
QIterator operator- (qsizetype j) const
 Returns an iterator to the item at j positions backward from this iterator.
Public Member Functions inherited from QBaseIterator< QMetaSequence >
voidmutableIterator ()
 Returns a non-const pointer to the internal native iterator.
const voidconstIterator () const
 Returns a const pointer to the internal native iterator.
QMetaSequence metaContainer () const

Additional Inherited Members

Protected Member Functions inherited from QBaseIterator< QMetaSequence >
 QBaseIterator ()=default
 ~QBaseIterator ()
QBaseIteratoroperator= (QBaseIterator &&other)
QIterable< QMetaSequence > * mutableIterable () const
const QIterable< QMetaSequence > * constIterable () const
void initIterator (const void *copy)
void clearIterator ()

Detailed Description

Definition at line 12 of file qsequentialiterable.h.

Member Typedef Documentation

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ QSequentialIterator()

QSequentialIterator::QSequentialIterator ( QIterator && it)
inline

Definition at line 19 of file qsequentialiterable.h.

Member Function Documentation

◆ operator*()

QVariantRef< QSequentialIterator > QSequentialIterator::operator* ( ) const

\typealias QSequentialIterable::const_iterator

The QSequentialIterable::const_iterator allows iteration over a container in a QVariant.

A QSequentialIterable::const_iterator can only be created by a QSequentialIterable instance, and can be used in a way similar to other stl-style iterators.

QList<int> intList = {7, 11, 42};
// Can use C++11 range-for:
for (const QVariant &v : iterable) {
qDebug() << v;
}
// Can use iterators:
const QSequentialIterable::const_iterator end = iterable.end();
for ( ; it != end; ++it) {
qDebug() << *it;
}
}

\typealias QSequentialIterable::iterator

Since
6.0

The QSequentialIterable::iterator allows iteration over a container in a QVariant.

A QSequentialIterable::iterator can only be created by a QSequentialIterable instance, and can be used in a way similar to other stl-style iterators.

Returns the current item, converted to a QVariantRef.

Definition at line 183 of file qsequentialiterable.cpp.

◆ operator->()

QVariantPointer< QSequentialIterator > QSequentialIterator::operator-> ( ) const

Returns the current item, converted to a QVariantPointer.

Definition at line 191 of file qsequentialiterable.cpp.


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