6.0.0-rc4Source

QCborMap::Iterator Class

The Iterator class is the iterator of QCborMap that can change values. More…

Header#include <QCborMap>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Since5.12
Nested inQCborMap

List of all members, including inherited members

Public Types

typedefiterator_category
typedefdifference_type
typedefvalue_type
typedefreference
typedefpointer

Public Functions

Iterator()
Iterator(const Iterator &other)
Iterator &operator=(const Iterator &other)
value_typeoperator*() const
value_typeoperator[](qsizetype j) const
QCborValueRef *operator->()
const QCborValueConstRef *operator->() const
QCborValueRefvalue() const
booloperator==(const ConstIterator &other) const
booloperator!=(const ConstIterator &other) const
QCborValueConstRefkey() const
booloperator==(const Iterator &other) const
booloperator!=(const Iterator &other) const
booloperator<(const Iterator &other) const
booloperator<=(const Iterator &other) const
booloperator>(const Iterator &other) const
booloperator>=(const Iterator &other) 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-(Iterator j) const

Detailed Description

Dereferencing it gives the key and a QCborValueRef to the value, so that the pairs can be taken apart in a range-based for loop. value() and the operator-> refer to the value.

Differences from Qt

The iterator is invalid once the map gets or loses pairs.

Member Type Documentation

typedef QCborMap::Iterator::difference_type

The type of a distance between iterators.

typedef QCborMap::Iterator::iterator_category

The category of the iterator.

typedef QCborMap::Iterator::pointer

A pointer to a reference to the value.

typedef QCborMap::Iterator::reference

The type that dereferencing gives: the key, and the value that can be assigned to.

typedef QCborMap::Iterator::value_type

The type of a pair.

Member Function Documentation

QCborMap::Iterator::Iterator()

Constructs an iterator that points nowhere.

QCborMap::Iterator::Iterator(const Iterator &other)

Constructs a copy of other.

QCborValueConstRef QCborMap::Iterator::key() const

Returns a reference to the key of the pair.

bool QCborMap::Iterator::operator!=(const ConstIterator &other) const

This is an overloaded function.

Returns true if other points to another pair.

bool QCborMap::Iterator::operator!=(const Iterator &other) const

Returns true if other points to another pair.

value_type QCborMap::Iterator::operator*() const

Returns the key and a reference to the value of the pair.

Iterator QCborMap::Iterator::operator+(qsizetype j) const

Returns an iterator j pairs on.

Iterator & QCborMap::Iterator::operator++()

Moves to the next pair and returns this iterator.

Iterator QCborMap::Iterator::operator++(int)

Moves to the next pair and returns an iterator to the pair before.

Iterator & QCborMap::Iterator::operator+=(qsizetype j)

Moves j pairs on and returns this iterator.

Iterator QCborMap::Iterator::operator-(qsizetype j) const

Returns an iterator j pairs back.

qsizetype QCborMap::Iterator::operator-(Iterator j) const

Returns the number of pairs from j to this iterator.

Iterator & QCborMap::Iterator::operator--()

Moves to the pair before and returns this iterator.

Iterator QCborMap::Iterator::operator--(int)

Moves to the pair before and returns an iterator to the pair it was at.

Iterator & QCborMap::Iterator::operator-=(qsizetype j)

Moves j pairs back and returns this iterator.

QCborValueRef * QCborMap::Iterator::operator->()

Returns a pointer to a reference to the value of the pair.

const QCborValueConstRef * QCborMap::Iterator::operator->() const

Returns a pointer to a reference to the value of the pair that cannot be assigned through.

bool QCborMap::Iterator::operator<(const Iterator &other) const

Returns true if this iterator points before other.

bool QCborMap::Iterator::operator<=(const Iterator &other) const

Returns true if this iterator points before other or to the same pair.

Iterator & QCborMap::Iterator::operator=(const Iterator &other)

Makes this iterator point where other does.

bool QCborMap::Iterator::operator==(const ConstIterator &other) const

This is an overloaded function.

Returns true if other points to the same pair.

bool QCborMap::Iterator::operator==(const Iterator &other) const

Returns true if other points to the same pair.

bool QCborMap::Iterator::operator>(const Iterator &other) const

Returns true if this iterator points after other.

bool QCborMap::Iterator::operator>=(const Iterator &other) const

Returns true if this iterator points after other or to the same pair.

value_type QCborMap::Iterator::operator[](qsizetype j) const

Returns the key and a reference to the value of the pair j places on.

QCborValueRef QCborMap::Iterator::value() const

Returns a reference to the value of the pair; assigning to it changes the map.