QProtobufRepeatedIterator Class

Allows iterating over repeated protobuf types. More...

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

Public Functions

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

Detailed Description

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

Member Function Documentation

[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

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

[noexcept] bool QProtobufRepeatedIterator::isValid() const

Returns 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)

Move-assigns other to this QProtobufRepeatedIterator and returns a reference to the updated object.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.