6.0.0-rc4Source

QSequentialIterable::const_iterator Class

The const_iterator class is a read-only iterator over a QSequentialIterable. More…

Header#include <QSequentialIterable>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Nested inQSequentialIterable

List of all members, including inherited members

Public Types

typedefiterator_category
typedefdifference_type
typedefvalue_type
typedefpointer
typedefreference

Public Functions

const_iterator()
QVariantoperator*() const
QVariantoperator[](qsizetype j) const
booloperator==(const const_iterator &o) const
booloperator!=(const const_iterator &o) const
booloperator<(const const_iterator &o) const
booloperator<=(const const_iterator &o) const
booloperator>(const const_iterator &o) const
booloperator>=(const const_iterator &o) const
const_iterator &operator++()
const_iteratoroperator++(int)
const_iterator &operator--()
const_iteratoroperator--(int)
const_iterator &operator+=(qsizetype j)
const_iterator &operator-=(qsizetype j)
const_iteratoroperator+(qsizetype j) const
const_iteratoroperator-(qsizetype j) const
qsizetypeoperator-(const const_iterator &j) const

Detailed Description

Dereferencing it returns each element as a QVariant.

Differences from Qt

The iterator is addressed by index, so advancing an iterator over a std::list or a QSet takes time proportional to the position.

Member Type Documentation

typedef QSequentialIterable::const_iterator::difference_type

The type of the difference between two iterators.

typedef QSequentialIterable::const_iterator::iterator_category

The category of the iterator for the standard library.

typedef QSequentialIterable::const_iterator::pointer

The pointer type of the elements.

typedef QSequentialIterable::const_iterator::reference

The type that dereferencing the iterator returns: a QVariant by value.

typedef QSequentialIterable::const_iterator::value_type

The type of the elements: QVariant.

Member Function Documentation

QSequentialIterable::const_iterator::const_iterator()

Constructs an iterator that does not refer to a container.

bool QSequentialIterable::const_iterator::operator!=(const const_iterator &o) const

Returns true if o refers to a different position or container.

QVariant QSequentialIterable::const_iterator::operator*() const

Returns the element that the iterator refers to.

const_iterator QSequentialIterable::const_iterator::operator+(qsizetype j) const

Returns an iterator j elements after this one.

const_iterator & QSequentialIterable::const_iterator::operator++()

Advances the iterator by one element and returns a reference to it.

const_iterator QSequentialIterable::const_iterator::operator++(int)

This is an overloaded function.

Advances the iterator by one element and returns its previous position.

const_iterator & QSequentialIterable::const_iterator::operator+=(qsizetype j)

Advances the iterator by j elements and returns a reference to it.

const_iterator QSequentialIterable::const_iterator::operator-(qsizetype j) const

Returns an iterator j elements before this one.

qsizetype QSequentialIterable::const_iterator::operator-(const const_iterator &j) const

Returns the number of elements between j and this iterator.

const_iterator & QSequentialIterable::const_iterator::operator--()

Moves the iterator back by one element and returns a reference to it.

const_iterator QSequentialIterable::const_iterator::operator--(int)

This is an overloaded function.

Moves the iterator back by one element and returns its previous position.

const_iterator & QSequentialIterable::const_iterator::operator-=(qsizetype j)

Moves the iterator back by j elements and returns a reference to it.

bool QSequentialIterable::const_iterator::operator<(const const_iterator &o) const

Returns true if this iterator is before o.

bool QSequentialIterable::const_iterator::operator<=(const const_iterator &o) const

Returns true if this iterator is before or at the position of o.

bool QSequentialIterable::const_iterator::operator==(const const_iterator &o) const

Returns true if o refers to the same position in the same container.

bool QSequentialIterable::const_iterator::operator>(const const_iterator &o) const

Returns true if this iterator is after o.

bool QSequentialIterable::const_iterator::operator>=(const const_iterator &o) const

Returns true if this iterator is after or at the position of o.

QVariant QSequentialIterable::const_iterator::operator[](qsizetype j) const

Returns the element j positions after the one this iterator refers to.