QIterable 类

template <typename Container> class QIterable

QIterable 是基类模板类,用于 QSequentialIterable and QAssociativeIterable . 更多...

头: #include <QIterable>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 6.0
继承者: QAssociativeIterable and QSequentialIterable

公共函数

bool canForwardIterate () const
bool canInputIterate () const
bool canRandomAccessIterate () const
bool canReverseIterate () const
QConstIterator<Container> constBegin () const
QConstIterator<Container> constEnd () const
QIterator<Container> mutableBegin ()
QIterator<Container> mutableEnd ()
qsizetype size () const

详细描述

成员函数文档编制

bool QIterable:: canForwardIterate () const

Returns whether it is possible to iterate over the container in forward direction. This corresponds to the std::forward_iterator_tag iterator trait of the iterator and const_iterator of the container.

bool QIterable:: canInputIterate () const

Returns whether the container has an input iterator. This corresponds to the std::input_iterator_tag iterator trait of the iterator and const_iterator of the container.

bool QIterable:: canRandomAccessIterate () const

Returns whether it is possible to efficiently skip over multiple values using and iterator. This corresponds to the std::random_access_iterator_tag iterator trait of the iterator and const_iterator of the container.

bool QIterable:: canReverseIterate () const

Returns whether it is possible to iterate over the container in reverse. This corresponds to the std::bidirectional_iterator_tag iterator trait of the const_iterator of the container.

QConstIterator < Container > QIterable:: constBegin () const

返回 QConstIterator for the beginning of the container. This can be used in stl-style iteration.

另请参阅 constEnd () 和 mutableBegin ().

QConstIterator < Container > QIterable:: constEnd () const

Returns a Qterable::QConstIterator for the end of the container. This can be used in stl-style iteration.

另请参阅 constBegin () 和 mutableEnd ().

QIterator < Container > QIterable:: mutableBegin ()

返回 QIterator for the beginning of the container. This can be used in stl-style iteration.

另请参阅 mutableEnd () 和 constBegin ().

QIterator < Container > QIterable:: mutableEnd ()

Returns a QSequentialIterable::iterator for the end of the container. This can be used in stl-style iteration.

另请参阅 mutableBegin () 和 constEnd ().

qsizetype QIterable:: size () const

Returns the number of values in the container.