6.0.0-rc4Source

QJsonArray::iterator Class

The QJsonArray::iterator class is an STL-style non-const iterator for QJsonArray. More…

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

List of all members, including inherited members

Public Types

typedefiterator_category
typedefdifference_type
typedefvalue_type
typedefreference
typedefpointer

Public Functions

iterator()
iterator(QJsonArray *array, qsizetype index)
QJsonValueRefoperator*() const
QJsonRefArrow<QJsonValueRef>operator->() const
QJsonValueRefoperator[](qsizetype j) const
booloperator==(const iterator &o) const
booloperator!=(const iterator &o) const
booloperator<(const iterator &o) const
booloperator<=(const iterator &o) const
booloperator>(const iterator &o) const
booloperator>=(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
booloperator>=(const const_iterator &o) const
iterator &operator++()
iteratoroperator++(int)
iterator &operator--()
iteratoroperator--(int)
iterator &operator+=(qsizetype j)
iterator &operator-=(qsizetype j)
iteratoroperator+(qsizetype j) const
iteratoroperator-(qsizetype j) const
qsizetypeoperator-(const iterator &o) const

Detailed Description

A random access iterator over the values of an array. Dereferencing it gives a QJsonValueRef, which can be assigned to.

See also QJsonArray::const_iterator.

Member Type Documentation

typedef QJsonArray::iterator::difference_type

Alias for qsizetype.

typedef QJsonArray::iterator::iterator_category

Marks the iterator as a random access iterator.

typedef QJsonArray::iterator::pointer

The type operator->() returns.

typedef QJsonArray::iterator::reference

Alias for QJsonValueRef.

typedef QJsonArray::iterator::value_type

Alias for QJsonValue.

Member Function Documentation

QJsonArray::iterator::iterator()

Creates an iterator that refers to no array.

[explicit] QJsonArray::iterator::iterator(QJsonArray *array, qsizetype index)

Creates an iterator that refers to position index of array.

bool QJsonArray::iterator::operator!=(const iterator &o) const

Returns true if o refers to another position.

bool QJsonArray::iterator::operator!=(const const_iterator &o) const

This is an overloaded function.

QJsonValueRef QJsonArray::iterator::operator*() const

Returns a reference to the current value.

iterator QJsonArray::iterator::operator+(qsizetype j) const

Returns an iterator j values after this one.

iterator & QJsonArray::iterator::operator++()

Advances the iterator to the next value and returns it.

iterator QJsonArray::iterator::operator++(int)

This is an overloaded function.

Advances the iterator and returns its previous position.

iterator & QJsonArray::iterator::operator+=(qsizetype j)

Advances the iterator by j values and returns it.

iterator QJsonArray::iterator::operator-(qsizetype j) const

This is an overloaded function.

Returns an iterator j values before this one.

qsizetype QJsonArray::iterator::operator-(const iterator &o) const

This is an overloaded function.

Returns the number of values between o and this iterator.

iterator & QJsonArray::iterator::operator--()

Moves the iterator to the previous value and returns it.

iterator QJsonArray::iterator::operator--(int)

This is an overloaded function.

Moves the iterator back and returns its previous position.

iterator & QJsonArray::iterator::operator-=(qsizetype j)

Moves the iterator back by j values and returns it.

QJsonRefArrow<QJsonValueRef> QJsonArray::iterator::operator->() const

Returns a pointer-like helper for the current value.

bool QJsonArray::iterator::operator<(const iterator &o) const

Returns true if this iterator is before o.

bool QJsonArray::iterator::operator<(const const_iterator &o) const

This is an overloaded function.

bool QJsonArray::iterator::operator<=(const iterator &o) const

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

bool QJsonArray::iterator::operator<=(const const_iterator &o) const

This is an overloaded function.

bool QJsonArray::iterator::operator==(const iterator &o) const

Returns true if o refers to the same position.

bool QJsonArray::iterator::operator==(const const_iterator &o) const

This is an overloaded function.

bool QJsonArray::iterator::operator>(const iterator &o) const

Returns true if this iterator is after o.

bool QJsonArray::iterator::operator>(const const_iterator &o) const

This is an overloaded function.

bool QJsonArray::iterator::operator>=(const iterator &o) const

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

bool QJsonArray::iterator::operator>=(const const_iterator &o) const

This is an overloaded function.

QJsonValueRef QJsonArray::iterator::operator[](qsizetype j) const

Returns a reference to the value j positions after the current one.