QProtobufRepeatedIterator Class

Allows iterating over repeated protobuf types. 更多...

头: #include <QProtobufRepeatedIterator>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
Since: Qt 6.8

公共函数

QProtobufRepeatedIterator (QProtobufRepeatedIterator && other )
~QProtobufRepeatedIterator ()
QProtobufMessage * addNext ()
bool hasNext () const
bool isValid () const
QProtobufMessage * next ()
void push ()
QProtobufRepeatedIterator & operator= (QProtobufRepeatedIterator && other )

详细描述

Allows iterating over repeated protobuf types and access the repeated field elements as reference to QProtobufMessage .

成员函数文档编制

[noexcept] QProtobufRepeatedIterator:: QProtobufRepeatedIterator ( QProtobufRepeatedIterator && other )

Move-constructs a new QProtobufRepeatedIterator from other .

[noexcept] QProtobufRepeatedIterator:: ~QProtobufRepeatedIterator ()

Destroys iterator.

QProtobufMessage *QProtobufRepeatedIterator:: addNext ()

Returns a new temporary element in the repeated field.

[noexcept] bool QProtobufRepeatedIterator:: hasNext () const

返回 true if the iterator can read the next element from the repeated field.

[noexcept] bool QProtobufRepeatedIterator:: isValid () const

返回 true if the iterator points to a valid data object.

QProtobufMessage *QProtobufRepeatedIterator:: next ()

Returns the next element under from the repeated field.

void QProtobufRepeatedIterator:: push ()

Adds the element, created by addNext function, to the repeated field.

[noexcept] QProtobufRepeatedIterator &QProtobufRepeatedIterator:: operator= ( QProtobufRepeatedIterator && other )

移动赋值 other 到此 QProtobufRepeatedIterator and returns a reference to the updated object.