QConstIterator 結構

template <typename Container> struct QConstIterator

QConstIterator 允許迭代容器在 QVariant . 更多...

頭: #include <QConstIterator>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 6.0
繼承: QBaseIterator

公共函數

QConstIterator (const QIterable<Container> * iterable , void * iterator )
bool operator!= (const QConstIterator<Container> & other ) const
QConstIterator<Container> operator+ (qsizetype j ) const
QConstIterator<Container> & operator++ ()
QConstIterator<Container> operator++ (int)
QConstIterator<Container> & operator+= (qsizetype j )
QConstIterator<Container> operator- (qsizetype j ) const
qsizetype operator- (const QConstIterator<Container> & j ) const
QConstIterator<Container> & operator-- ()
QConstIterator<Container> operator-- (int)
QConstIterator<Container> & operator-= (qsizetype j )
bool operator== (const QConstIterator<Container> & other ) const

詳細描述

另請參閱 QIterator and QIterable .

成員函數文檔編製

[explicit] QConstIterator:: QConstIterator (const QIterable < 容器 > * iterable , void * iterator )

創建 QConstIterator 以包裹 iterator ,操作 iterable .

bool QConstIterator:: operator!= (const QConstIterator < 容器 > & other ) const

返迴 true if other 指嚮與此迭代器不同的項;否則返迴 false .

另請參閱 operator== ().

QConstIterator < 容器 > QConstIterator:: operator+ ( qsizetype j ) const

Returns an iterator to the item at j positions forward from this iterator.

另請參閱 operator- () 和 operator+= ().

QConstIterator < 容器 > &QConstIterator:: 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 QIterable <Container>::end() leads to undefined results.

另請參閱 operator-- ().

QConstIterator < 容器 > QConstIterator:: operator++ ( int )

The postfix ++ 運算符 ( it++ ) advances the iterator to the next item in the container and returns an iterator to the previously current item.

這是重載函數。

QConstIterator < 容器 > &QConstIterator:: operator+= ( qsizetype j )

推進迭代器 j 項。

另請參閱 operator-= () 和 operator+ ().

QConstIterator < 容器 > QConstIterator:: operator- ( qsizetype j ) const

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 ().

qsizetype QConstIterator:: operator- (const QConstIterator < 容器 > & j ) const

Returns the distance between the two iterators.

這是重載函數。

另請參閱 operator+ (), operator-= (),和 QIterable::canReverseIterate ().

QConstIterator < 容器 > &QConstIterator:: operator-- ()

前綴 -- 運算符 ( --it ) makes the preceding item current and returns an iterator to the new current item.

Calling this function on QIterable <Container>::begin() 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 ().

QConstIterator < 容器 > QConstIterator:: operator-- ( int )

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 ().

QConstIterator < 容器 > &QConstIterator:: operator-= ( qsizetype j )

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 ().

bool QConstIterator:: operator== (const QConstIterator < 容器 > & other ) const

返迴 true if other points to the same item as this iterator; otherwise returns false .

另請參閱 operator!= ().

內容

  1. 公共函數

  2. 詳細描述