6.0.0-rc4Source

QJsonObject::const_iterator Class

The QJsonObject::const_iterator class is an STL-style const iterator for QJsonObject. More…

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

List of all members, including inherited members

Public Types

typedefiterator_category
typedefdifference_type
typedefvalue_type
typedefreference
typedefpointer

Public Functions

const_iterator()
const_iterator(const QJsonObject *object, qsizetype index)
const_iterator(const iterator &other)
QStringkey() const
QAnyStringViewkeyView() const
QJsonValueConstRefvalue() const
QJsonValueConstRefoperator*() const
QJsonRefArrow<QJsonValueConstRef>operator->() const
QJsonValueConstRefoperator[](qsizetype j) const
booloperator==(const const_iterator &other) const
booloperator!=(const const_iterator &other) const
booloperator<(const const_iterator &other) const
booloperator<=(const const_iterator &other) const
booloperator>(const const_iterator &other) const
booloperator>=(const const_iterator &other) 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 &other) const

Detailed Description

A random access iterator over the entries of an object, in the sorted order of their keys. key() returns the key and the dereferenced value is a QJsonValueConstRef.

See also QJsonObject::iterator.

Member Type Documentation

typedef QJsonObject::const_iterator::difference_type

Alias for qsizetype.

typedef QJsonObject::const_iterator::iterator_category

Marks the iterator as a random access iterator.

typedef QJsonObject::const_iterator::pointer

The type operator->() returns.

typedef QJsonObject::const_iterator::reference

Alias for QJsonValueConstRef.

typedef QJsonObject::const_iterator::value_type

Alias for QJsonValue.

Member Function Documentation

QJsonObject::const_iterator::const_iterator()

Creates an iterator that refers to no object.

[explicit] QJsonObject::const_iterator::const_iterator(const QJsonObject *object, qsizetype index)

Creates an iterator that refers to entry index of object.

QJsonObject::const_iterator::const_iterator(const iterator &other)

Creates a const iterator that refers to the entry of other.

QString QJsonObject::const_iterator::key() const

Returns the key of the current entry.

QAnyStringView QJsonObject::const_iterator::keyView() const

Returns a view of the key of the current entry, without copying it. The view is valid until a key is inserted into the object or removed from it.

This function was introduced in 6.10.

See also key().

bool QJsonObject::const_iterator::operator!=(const const_iterator &other) const

Returns true if other refers to another entry.

QJsonValueConstRef QJsonObject::const_iterator::operator*() const

Returns a reference to the value of the current entry.

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

Returns an iterator j entries after this one.

const_iterator & QJsonObject::const_iterator::operator++()

Advances the iterator to the next entry and returns it.

const_iterator QJsonObject::const_iterator::operator++(int)

This is an overloaded function.

Advances the iterator and returns its previous position.

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

Advances the iterator by j entries and returns it.

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

This is an overloaded function.

Returns an iterator j entries before this one.

qsizetype QJsonObject::const_iterator::operator-(const const_iterator &other) const

This is an overloaded function.

Returns the number of entries between other and this iterator.

const_iterator & QJsonObject::const_iterator::operator--()

Moves the iterator to the previous entry and returns it.

const_iterator QJsonObject::const_iterator::operator--(int)

This is an overloaded function.

Moves the iterator back and returns its previous position.

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

Moves the iterator back by j entries and returns it.

QJsonRefArrow<QJsonValueConstRef> QJsonObject::const_iterator::operator->() const

Returns a pointer-like helper for the value of the current entry.

bool QJsonObject::const_iterator::operator<(const const_iterator &other) const

Returns true if this iterator is before other.

bool QJsonObject::const_iterator::operator<=(const const_iterator &other) const

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

bool QJsonObject::const_iterator::operator==(const const_iterator &other) const

Returns true if other refers to the same entry.

bool QJsonObject::const_iterator::operator>(const const_iterator &other) const

Returns true if this iterator is after other.

bool QJsonObject::const_iterator::operator>=(const const_iterator &other) const

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

QJsonValueConstRef QJsonObject::const_iterator::operator[](qsizetype j) const

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

QJsonValueConstRef QJsonObject::const_iterator::value() const

Returns a reference to the value of the current entry.