QProtobufRepeatedIterator Class
允许遍历重复的 protobuf 类型。更多
Header: | #include <QProtobufRepeatedIterator> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Protobuf) target_link_libraries(mytarget PRIVATE Qt6::Protobuf) |
自 | Qt 6.8 |
公共函数
QProtobufRepeatedIterator(QProtobufRepeatedIterator &&other) | |
~QProtobufRepeatedIterator() | |
QProtobufMessage * | addNext() |
bool | hasNext() const |
bool | isValid() const |
QProtobufMessage * | next() |
void | push() |
QProtobufRepeatedIterator & | operator=(QProtobufRepeatedIterator &&other) |
详细说明
允许遍历重复的 protobuf 类型,并访问作为QProtobufMessage 引用的重复字段元素。
成员函数文档
[noexcept]
QProtobufRepeatedIterator::QProtobufRepeatedIterator(QProtobufRepeatedIterator &&other)
移动-从other 构建一个新的 QProtobufRepeatedIterator。
[noexcept]
QProtobufRepeatedIterator::~QProtobufRepeatedIterator()
销毁迭代器。
QProtobufMessage *QProtobufRepeatedIterator::addNext()
返回重复字段中的新临时元素。
[noexcept]
bool QProtobufRepeatedIterator::hasNext() const
如果迭代器能从重复字段读取下一个元素,则返回true
。
[noexcept]
bool QProtobufRepeatedIterator::isValid() const
如果迭代器指向一个有效的数据对象,则返回true
。
QProtobufMessage *QProtobufRepeatedIterator::next()
返回重复字段下一个元素。
void QProtobufRepeatedIterator::push()
将addNext 函数创建的元素添加到重复字段中。
[noexcept]
QProtobufRepeatedIterator &QProtobufRepeatedIterator::operator=(QProtobufRepeatedIterator &&other)
Move-assignsother 至QProtobufRepeatedIterator ,并返回更新对象的引用。
© 2025 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.