QtProtobuf Namespace

QtProtobuf 名前空間には、Qt Protobuf をサポートするために必要な型エイリアスやクラスが含まれています。さらに...

ヘッダー #include <QtProtobuf>
CMake: find_package(Qt6 REQUIRED COMPONENTS Protobuf)
target_link_libraries(mytarget PRIVATE Qt6::Protobuf)
以来:Qt 6.5

クラス

(since 6.6) class Any

関数

詳しい説明

クラス

クラスAny

protobuf Any型の操作を簡略化するヘルパークラスです。詳細...

型のドキュメント

enum class QtProtobuf::WireTypes

WireTypes列挙は、protobufのデフォルトのワイヤタイプを反映する。

次の表に、列挙の値と対応する型を示します:

定数説明
QtProtobuf::WireTypes::Unknown-1無効なワイヤタイプ
QtProtobuf::WireTypes::Varint0int32, int64, uint32, uint64, sint32, sint64, bool, enum
QtProtobuf::WireTypes::Fixed641fixed64、sfixed64、double
QtProtobuf::WireTypes::LengthDelimited2文字列、バイト、埋め込みメッセージ、パックされた繰り返しフィールド
QtProtobuf::WireTypes::StartGroup3グループ。proto syntax 3では非推奨。Qt Protobuf ではサポートされていません。
QtProtobuf::WireTypes::EndGroup4グループ。proto 構文 3 では非推奨。Qt Protobuf ではサポートされていません。
QtProtobuf::WireTypes::Fixed325fixed32, sfixed32, float。

エンコーディングも参照してください

[alias] QtProtobuf::boolList

boolのリストのエイリアス。

[alias] QtProtobuf::doubleList

ダブルのリストのエイリアス。

[alias] QtProtobuf::fixed32

fixed32 は符号なし 32 ビット整数で、protobuf では固定サイズの 32 ビットフィールドとして表現される。WireTypes::Fixed32 の別名。

[alias] QtProtobuf::fixed64

fixed64は符号なし64ビット整数で、protobufでは固定サイズの64ビットフィールドとして表現され、WireTypes::Fixed64 の別名である。

[alias] QtProtobuf::fixed32List

QtProtobuf::fixed32 のリストのエイリアス。

[alias] QtProtobuf::fixed64List

QtProtobuf::fixed64 のリストのエイリアス。

[alias] QtProtobuf::floatList

float のリストのエイリアス。

[alias] QtProtobuf::int32

int32は通常の符号付き32ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。

[alias] QtProtobuf::int64

int64は通常の符号付き64ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。

[alias] QtProtobuf::int32List

QtProtobuf::int32 のリストのエイリアス。

[alias] QtProtobuf::int64List

QtProtobuf::int64 のリストのエイリアス。

[alias] QtProtobuf::sfixed32

sfixed32は符号付き32ビット整数で、protobufでは固定サイズの32ビットフィールドとして表現され、WireTypes::Fixed32 の別名である。

[alias] QtProtobuf::sfixed64

sfixed64 は符号付き64ビット整数で、protobufでは固定サイズの64ビットフィールドとして表現され、WireTypes::Fixed64 の別名である。

[alias] QtProtobuf::sfixed32List

QtProtobuf::sfixed32 のリストのエイリアス。

[alias] QtProtobuf::sfixed64List

QtProtobuf::sfixed64 のリストのエイリアス。

[alias] QtProtobuf::sint32

sint32は強制符号付き32ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。 sint32は負の数のサイズを小さくするためにZigZag変換を使って直列化される。

符号付き整数も参照してください

[alias] QtProtobuf::sint64

sint64は強制符号付き64ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。 sint64は負の数のサイズを小さくするためにZigZag変換を使って直列化される。

符号付き整数も参照してください

[alias] QtProtobuf::sint32List

QtProtobuf::sint32 のリストのエイリアス。

[alias] QtProtobuf::sint64List

QtProtobuf::sint64 のリストのエイリアス。

[alias] QtProtobuf::uint32

uint32は符号なし32ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。

[alias] QtProtobuf::uint64

uint64は符号なし64ビット整数で、protobufでは可変サイズ整数として表現され、WireTypes::Varint の別名である。

[alias] QtProtobuf::uint32List

QtProtobuf::uint32 のリストのエイリアス。

[alias] QtProtobuf::uint64List

QtProtobuf::uint64 のリストのエイリアス。

関数ドキュメント

template <typename T, std::enable_if_t<std::is_enum<T>::value, bool> = true> void qRegisterProtobufEnumType()

列挙型T のシリアライザをQtProtobuf グローバル・シリアライザ・レジストリに登録します。

この関数は通常、生成されたコードによって呼び出されます。

template <typename K, typename V, QtProtobuf::if_protobuf_map<K, V> = true> void qRegisterProtobufMapType()

KVVQProtobufMessage でなければならない。 この関数は通常、生成されたコードから呼び出される。

template <typename T, QtProtobuf::if_protobuf_message<T> = true> void qRegisterProtobufType()

T型のProtobufを登録する。この関数は通常、生成されたコードから呼び出される。

void qRegisterProtobufTypes()

この関数を呼び出すと、現在知られているすべての protobuf 型がシリアライザレジストリに登録されます。

注意: Qt 6.6.3以降では、この関数は自動的に呼び出されるため、手動で呼び出す必要はありません。それ以前のバージョンでは、シリアライズ/デシリアライズの前にこの関数を呼び出す方が良いでしょう。

void QtProtobuf::registerProtobufQtCoreTypes()

Qt::ProtobufQtCoreTypesライブラリのシリアライザを登録します。

void QtProtobuf::registerProtobufQtGuiTypes()

Qt::ProtobufQtGuiTypesライブラリのシリアライザを登録します。

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