6.0.0-rc4Source

QCborArray::Iterator Class

The Iterator class is the iterator of QCborArray that can change elements. More…

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

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