QJsonArray::iterator Class
The QJsonArray::iterator class is an STL-style non-const iterator for QJsonArray. More…
| Header | #include <QJsonArray> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Nested in | QJsonArray |
List of all members, including inherited members
Public Types
| typedef | iterator_category |
| typedef | difference_type |
| typedef | value_type |
| typedef | reference |
| typedef | pointer |
Public Functions
| iterator() | |
| iterator(QJsonArray *array, qsizetype index) | |
| QJsonValueRef | operator*() const |
| QJsonRefArrow<QJsonValueRef> | operator->() const |
| QJsonValueRef | operator[](qsizetype j) const |
| bool | operator==(const iterator &o) const |
| bool | operator!=(const iterator &o) const |
| bool | operator<(const iterator &o) const |
| bool | operator<=(const iterator &o) const |
| bool | operator>(const iterator &o) const |
| bool | operator>=(const iterator &o) const |
| bool | operator==(const const_iterator &o) const |
| bool | operator!=(const const_iterator &o) const |
| bool | operator<(const const_iterator &o) const |
| bool | operator<=(const const_iterator &o) const |
| bool | operator>(const const_iterator &o) const |
| bool | operator>=(const const_iterator &o) const |
| iterator & | operator++() |
| iterator | operator++(int) |
| iterator & | operator--() |
| iterator | operator--(int) |
| iterator & | operator+=(qsizetype j) |
| iterator & | operator-=(qsizetype j) |
| iterator | operator+(qsizetype j) const |
| iterator | operator-(qsizetype j) const |
| qsizetype | operator-(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.
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.