QCborMap::Iterator Class
The Iterator class is the iterator of QCborMap that can change values. More…
| Header | #include <QCborMap> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Since | 5.12 |
| Nested in | QCborMap |
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(const Iterator &other) | |
| Iterator & | operator=(const Iterator &other) |
| value_type | operator*() const |
| value_type | operator[](qsizetype j) const |
| QCborValueRef * | operator->() |
| const QCborValueConstRef * | operator->() const |
| QCborValueRef | value() const |
| bool | operator==(const ConstIterator &other) const |
| bool | operator!=(const ConstIterator &other) const |
| QCborValueConstRef | key() const |
| bool | operator==(const Iterator &other) const |
| bool | operator!=(const Iterator &other) const |
| bool | operator<(const Iterator &other) const |
| bool | operator<=(const Iterator &other) const |
| bool | operator>(const Iterator &other) const |
| bool | operator>=(const Iterator &other) 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-(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.