![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
#include <qcbormap.h>
Public Types | |
typedef std::random_access_iterator_tag | iterator_category |
A synonym for {std::random_access_iterator_tag} indicating this iterator is a random-access iterator. | |
typedef qsizetype | difference_type |
typedef std::pair< QCborValueConstRef, QCborValueConstRef > | value_type |
typedef std::pair< QCborValueConstRef, QCborValueConstRef > | reference |
typedef std::pair< QCborValueConstRef, QCborValueConstRef > | pointer |
Public Member Functions | |
constexpr | ConstIterator ()=default |
Constructs an uninitialized iterator. | |
constexpr | ConstIterator (const ConstIterator &)=default |
Constructs an iterator as a copy of other. | |
~ConstIterator ()=default | |
ConstIterator & | operator= (const ConstIterator &other) |
Makes this iterator a copy of other and returns a reference to this iterator. | |
value_type | operator* () const |
Returns a pair containing the current item's key and value. | |
value_type | operator[] (qsizetype j) const |
const QCborValueConstRef * | operator-> () const |
Returns a pointer to the current pair's value. | |
QCborValueConstRef | key () const |
Returns the current item's key. | |
QCborValueConstRef | keyRef () const |
QCborValueConstRef | value () const |
Returns the current item's value. | |
ConstIterator & | operator++ () |
The prefix {++} operator, {++i}, advances the iterator to the next item in the map and returns this iterator. | |
ConstIterator | operator++ (int) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The postfix {++} operator, {i++}, advances the iterator to the next item in the map and returns an iterator to the previously current item. | |
ConstIterator & | operator-- () |
The prefix {–} operator, {–i}, makes the preceding item current and returns this iterator. | |
ConstIterator | operator-- (int) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The postfix {–} operator, {i–}, makes the preceding item current and returns an iterator pointing to the previously current item. | |
ConstIterator & | operator+= (qsizetype j) |
Advances the iterator by j items. | |
ConstIterator & | operator-= (qsizetype j) |
Makes the iterator go back by j items. | |
ConstIterator | operator+ (qsizetype j) const |
Returns an iterator to the item at j positions forward from this iterator. | |
ConstIterator | operator- (qsizetype j) const |
Returns an iterator to the item at j positions backward from this iterator. | |
qsizetype | operator- (ConstIterator j) const |
Returns the position of the item at iterator j relative to the item at this iterator. |
Friends | |
class | Iterator |
class | QCborMap |
class | QCborValue |
class | QCborValueRef |
bool | comparesEqual (const ConstIterator &lhs, const ConstIterator &rhs) noexcept |
Qt::strong_ordering | compareThreeWay (const ConstIterator &lhs, const ConstIterator &rhs) |
\inmodule QtCore
The QCborMap::ConstIterator class provides an STL-style const iterator for QCborMap.
\compares strong \compareswith strong Iterator \endcompareswith
QCborMap::ConstIterator allows you to iterate over a QCborMap. If you want to modify the QCborMap as you iterate over it, you must use QCborMap::Iterator instead. It is generally good practice to use QCborMap::ConstIterator, even on a non-const QCborMap, when you don't need to change the QCborMap through the iterator. Const iterators are slightly faster and improve code readability.
You must initialize the iterator using a QCborMap function like QCborMap::begin(), QCborMap::end(), or QCborMap::find() before you can start iterating..
Multiple iterators can be used on the same object. Existing iterators will however become dangling if the object gets modified.
Definition at line 152 of file qcbormap.h.
Definition at line 162 of file qcbormap.h.
typedef std::random_access_iterator_tag QCborMap::ConstIterator::iterator_category |
A synonym for {std::random_access_iterator_tag} indicating this iterator is a random-access iterator.
Definition at line 161 of file qcbormap.h.
typedef std::pair<QCborValueConstRef, QCborValueConstRef> QCborMap::ConstIterator::pointer |
Definition at line 165 of file qcbormap.h.
typedef std::pair<QCborValueConstRef, QCborValueConstRef> QCborMap::ConstIterator::reference |
Definition at line 164 of file qcbormap.h.
typedef std::pair<QCborValueConstRef, QCborValueConstRef> QCborMap::ConstIterator::value_type |
Definition at line 163 of file qcbormap.h.
|
constexprdefault |
Constructs an uninitialized iterator.
Functions like key(), value(), and operator++() must not be called on an uninitialized iterator. Use operator=() to assign a value to it before using it.
|
constexprdefault |
Constructs an iterator as a copy of other.
|
default |
|
inline |
|
inline |
Definition at line 187 of file qcbormap.h.
|
inline |
Returns a pair containing the current item's key and value.
Definition at line 178 of file qcbormap.h.
|
inline |
Returns an iterator to the item at j positions forward from this iterator.
If j is negative, the iterator goes backward.
Definition at line 210 of file qcbormap.h.
|
inline |
The prefix {++} operator,
{++i}, advances the iterator to the next item in the map and returns this iterator.
Calling this function on QCborMap::end() leads to undefined results.
Definition at line 204 of file qcbormap.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The postfix {++} operator,
{i++}, advances the iterator to the next item in the map and returns an iterator to the previously current item.
Definition at line 205 of file qcbormap.h.
|
inline |
Advances the iterator by j items.
If j is negative, the iterator goes backward. Returns a reference to this iterator.
Definition at line 208 of file qcbormap.h.
|
inline |
Returns the position of the item at iterator j relative to the item at this iterator.
If the item at j is forward of this time, the returned value is negative.
Definition at line 212 of file qcbormap.h.
|
inline |
Returns an iterator to the item at j positions backward from this iterator.
If j is negative, the iterator goes forward.
Definition at line 211 of file qcbormap.h.
|
inline |
The prefix {–} operator,
{–i}, makes the preceding item current and returns this iterator.
Calling this function on QCborMap::begin() leads to undefined results.
Definition at line 206 of file qcbormap.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The postfix {–} operator,
{i–}, makes the preceding item current and returns an iterator pointing to the previously current item.
Definition at line 207 of file qcbormap.h.
|
inline |
Makes the iterator go back by j items.
If j is negative, the iterator goes forward. Returns a reference to this iterator.
Definition at line 209 of file qcbormap.h.
|
inline |
Returns a pointer to the current pair's value.
Definition at line 180 of file qcbormap.h.
|
inline |
Makes this iterator a copy of other and returns a reference to this iterator.
Definition at line 170 of file qcbormap.h.
|
inline |
Definition at line 179 of file qcbormap.h.
|
inline |
Returns the current item's value.
Definition at line 188 of file qcbormap.h.
|
friend |
Definition at line 228 of file qcbormap.h.
|
friend |
Definition at line 232 of file qcbormap.h.
|
friend |
Definition at line 154 of file qcbormap.h.
|
friend |
Definition at line 155 of file qcbormap.h.
|
friend |
Definition at line 156 of file qcbormap.h.
|
friend |
Definition at line 157 of file qcbormap.h.