QCborArray::Iterator Class
The Iterator class is the iterator of QCborArray that can change elements. More…
| Header | #include <QCborArray> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Since | 5.12 |
| Nested in | QCborArray |
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) |
| QCborValueRef | operator*() const |
| QCborValueRef * | operator->() |
| const QCborValueConstRef * | operator->() const |
| QCborValueRef | operator[](qsizetype j) 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 |
| bool | operator==(const ConstIterator &other) const |
| bool | operator!=(const ConstIterator &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 a QCborValueRef; assigning to that changes the element.
Differences from Qt
The iterator is invalid once the array gets or loses elements.
Member Type Documentation
typedef QCborArray::Iterator::difference_type
The type of a distance between iterators.
typedef QCborArray::Iterator::iterator_category
The category of the iterator.
typedef QCborArray::Iterator::pointer
A pointer to such a reference.
typedef QCborArray::Iterator::reference
The type that dereferencing gives: a reference that can be assigned to.
typedef QCborArray::Iterator::value_type
The type of the elements.
Member Function Documentation
QCborArray::Iterator::Iterator()
Constructs an iterator that points nowhere.
QCborArray::Iterator::Iterator(const Iterator &other)
Constructs a copy of other.
bool QCborArray::Iterator::operator!=(const Iterator &other) const
Returns true if other points to another element.
bool QCborArray::Iterator::operator!=(const ConstIterator &other) const
This is an overloaded function.
Returns true if other points to another element.
QCborValueRef QCborArray::Iterator::operator*() const
Returns a reference to the element; assigning to it changes the array.
Iterator QCborArray::Iterator::operator+(qsizetype j) const
Returns an iterator j elements on.
Iterator & QCborArray::Iterator::operator++()
Moves to the next element and returns this iterator.
Iterator QCborArray::Iterator::operator++(int)
Moves to the next element and returns an iterator to the element before.
Iterator & QCborArray::Iterator::operator+=(qsizetype j)
Moves j elements on and returns this iterator.
Iterator QCborArray::Iterator::operator-(qsizetype j) const
Returns an iterator j elements back.
qsizetype QCborArray::Iterator::operator-(Iterator j) const
Returns the number of elements from j to this iterator.
Iterator & QCborArray::Iterator::operator--()
Moves to the element before and returns this iterator.
Iterator QCborArray::Iterator::operator--(int)
Moves to the element before and returns an iterator to the element it was at.
Iterator & QCborArray::Iterator::operator-=(qsizetype j)
Moves j elements back and returns this iterator.
QCborValueRef * QCborArray::Iterator::operator->()
Returns a pointer to a reference to the element.
const QCborValueConstRef * QCborArray::Iterator::operator->() const
Returns a pointer to a reference to the element that cannot be assigned through.
bool QCborArray::Iterator::operator<(const Iterator &other) const
Returns true if this iterator points before other.
bool QCborArray::Iterator::operator<=(const Iterator &other) const
Returns true if this iterator points before other or to the same element.
Iterator & QCborArray::Iterator::operator=(const Iterator &other)
Makes this iterator point where other does.
bool QCborArray::Iterator::operator==(const Iterator &other) const
Returns true if other points to the same element.
bool QCborArray::Iterator::operator==(const ConstIterator &other) const
This is an overloaded function.
Returns true if other points to the same element.
bool QCborArray::Iterator::operator>(const Iterator &other) const
Returns true if this iterator points after other.
bool QCborArray::Iterator::operator>=(const Iterator &other) const
Returns true if this iterator points after other or to the same element.
QCborValueRef QCborArray::Iterator::operator[](qsizetype j) const
Returns a reference to the element j places on.