QTaggedIterator 是包裹迭代器並暴露標準迭代器特質的模闆類。 更多...
| 頭: |
#include <QTaggedIterator>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
|
| qmake: |
QT += core
|
| Since: | Qt 6.0 |
| QTaggedIterator (Iterator && it ) | |
| bool | operator!= (const QTaggedIterator<Iterator, IteratorCategory> & other ) const |
| QTaggedIterator<Iterator, IteratorCategory> | operator+ (qsizetype j ) const |
| QTaggedIterator<Iterator, IteratorCategory> & | operator++ () |
| QTaggedIterator<Iterator, IteratorCategory> | operator++ (int x ) |
| QTaggedIterator<Iterator, IteratorCategory> & | operator+= (qsizetype j ) |
| qsizetype | operator- (const QTaggedIterator<Iterator, IteratorCategory> & j ) const |
| QTaggedIterator<Iterator, IteratorCategory> | operator- (qsizetype j ) const |
| QTaggedIterator<Iterator, IteratorCategory> & | operator-- () |
| QTaggedIterator<Iterator, IteratorCategory> | operator-- (int x ) |
| QTaggedIterator<Iterator, IteratorCategory> & | operator-= (qsizetype j ) |
| bool | operator== (const QTaggedIterator<Iterator, IteratorCategory> & other ) const |
| QTaggedIterator<Iterator, IteratorCategory> | operator+ (qsizetype j , const QTaggedIterator<Iterator, IteratorCategory> & k ) |
In order to use an iterator any of the standard algorithms, its iterator traits need to be known. As QSequentialIterable can work with many different kinds of containers, we cannot declare the traits in the iterator classes themselves. A QTaggedIterator gives you a way to explicitly declare a trait for a concrete instance of an iterator or QConstIterator .
Constructs a QTaggedIterator from an iterator or QConstIterator it . Checks whether the IteratorCategory passed as template argument matches the run time capabilities of it ; if there's no match, it is refused.
返迴
true
if
other
指嚮與此迭代器不同的項;否則返迴
false
.
另請參閱 operator== ().
Returns an iterator to the item at j positions forward from this iterator.
另請參閱 operator- () 和 operator+= ().
前綴
++
運算符 (
++it
) advances the iterator to the next item in the container and returns an iterator to the new current item.
Calling this function on QSequentialIterable::constEnd () leads to undefined results.
另請參閱 operator-- ().
這是重載函數。
The postfix
++
運算符 (
it++
) advances the iterator to the next item in the container and returns an iterator to the previously current item.
推進迭代器 j 項。
另請參閱 operator-= () 和 operator+ ().
Returns the distance between this iterator and j .
另請參閱 operator+ (), operator-= (),和 QIterable::canReverseIterate ().
Returns an iterator to the item at j positions backward from this iterator.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另請參閱 operator+ (), operator-= (),和 QIterable::canReverseIterate ().
前綴
--
運算符 (
--it
) makes the preceding item current and returns an iterator to the new current item.
Calling this function on QSequentialIterable::constBegin () leads to undefined results.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另請參閱 operator++ () 和 QIterable::canReverseIterate ().
這是重載函數。
The postfix
--
運算符 (
it--
) makes the preceding item current and returns an iterator to the previously current item.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另請參閱 QIterable::canReverseIterate ().
Makes the iterator go back by j 項。
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另請參閱 operator+= (), operator- (),和 QIterable::canReverseIterate ().
返迴
true
if
other
points to the same item as this iterator; otherwise returns
false
.
另請參閱 operator!= ().
Returns an iterator to the item at j positions forward from iterator k .