QCborArray::ConstIterator Class
The ConstIterator class is the iterator of QCborArray that reads 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
| ConstIterator() | |
| ConstIterator(const ConstIterator &other) | |
| ConstIterator(const Iterator &other) | |
| ConstIterator & | operator=(const ConstIterator &other) |
| QCborValueConstRef | operator*() const |
| const QCborValueConstRef * | operator->() const |
| QCborValueConstRef | operator[](qsizetype j) const |
| bool | operator==(const ConstIterator &other) const |
| bool | operator!=(const ConstIterator &other) const |
| bool | operator<(const ConstIterator &other) const |
| bool | operator<=(const ConstIterator &other) const |
| bool | operator>(const ConstIterator &other) const |
| bool | operator>=(const ConstIterator &other) const |
| ConstIterator & | operator++() |
| ConstIterator | operator++(int) |
| ConstIterator & | operator--() |
| ConstIterator | operator--(int) |
| ConstIterator & | operator+=(qsizetype j) |
| ConstIterator & | operator-=(qsizetype j) |
| ConstIterator | operator+(qsizetype j) const |
| ConstIterator | operator-(qsizetype j) const |
| qsizetype | operator-(ConstIterator j) const |
Detailed Description
Differences from Qt
The iterator is invalid once the array gets or loses elements.
Member Type Documentation
typedef QCborArray::ConstIterator::difference_type
The type of a distance between iterators.
typedef QCborArray::ConstIterator::iterator_category
The category of the iterator.
typedef QCborArray::ConstIterator::pointer
A pointer to such a reference.
typedef QCborArray::ConstIterator::reference
The type that dereferencing gives.
typedef QCborArray::ConstIterator::value_type
The type of the elements.
Member Function Documentation
QCborArray::ConstIterator::ConstIterator()
Constructs an iterator that points nowhere.
QCborArray::ConstIterator::ConstIterator(const ConstIterator &other)
Constructs a copy of other.
QCborArray::ConstIterator::ConstIterator(const Iterator &other)
Constructs a const iterator that points where other does.
bool QCborArray::ConstIterator::operator!=(const ConstIterator &other) const
Returns true if other points to another element.
QCborValueConstRef QCborArray::ConstIterator::operator*() const
Returns a reference to the element.
ConstIterator QCborArray::ConstIterator::operator+(qsizetype j) const
Returns an iterator j elements on.
ConstIterator & QCborArray::ConstIterator::operator++()
Moves to the next element and returns this iterator.
ConstIterator QCborArray::ConstIterator::operator++(int)
Moves to the next element and returns an iterator to the element before.
ConstIterator & QCborArray::ConstIterator::operator+=(qsizetype j)
Moves j elements on and returns this iterator.
ConstIterator QCborArray::ConstIterator::operator-(qsizetype j) const
Returns an iterator j elements back.
qsizetype QCborArray::ConstIterator::operator-(ConstIterator j) const
Returns the number of elements from j to this iterator.
ConstIterator & QCborArray::ConstIterator::operator--()
Moves to the element before and returns this iterator.
ConstIterator QCborArray::ConstIterator::operator--(int)
Moves to the element before and returns an iterator to the element it was at.
ConstIterator & QCborArray::ConstIterator::operator-=(qsizetype j)
Moves j elements back and returns this iterator.
const QCborValueConstRef * QCborArray::ConstIterator::operator->() const
Returns a pointer to a reference to the element.
bool QCborArray::ConstIterator::operator<(const ConstIterator &other) const
Returns true if this iterator points before other.
bool QCborArray::ConstIterator::operator<=(const ConstIterator &other) const
Returns true if this iterator points before other or to the same element.
ConstIterator & QCborArray::ConstIterator::operator=(const ConstIterator &other)
Makes this iterator point where other does.
bool QCborArray::ConstIterator::operator==(const ConstIterator &other) const
Returns true if other points to the same element.
bool QCborArray::ConstIterator::operator>(const ConstIterator &other) const
Returns true if this iterator points after other.
bool QCborArray::ConstIterator::operator>=(const ConstIterator &other) const
Returns true if this iterator points after other or to the same element.
QCborValueConstRef QCborArray::ConstIterator::operator[](qsizetype j) const
Returns a reference to the element j places on.