QProtobufRepeatedIterator Class | Qt Protobuf | Qt 6.11.2
Description: Allows iterating over repeated protobuf types.

- Qt 6.11
- Qt Protobuf
- C++ Classes
- QProtobufRepeatedIterator
- Qt 6.11.2 Reference Documentation

# 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

- List of all members, including inherited members

## 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.