The QtProtobuf namespace contains type aliases and classes needed to support Qt Protobuf. More...
| Header: | #include <QtProtobuf> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Protobuf)target_link_libraries(mytarget PRIVATE Qt6::Protobuf) |
| Since: | Qt 6.5 |
| enum class | WireTypes { Unknown, Varint, Fixed64, LengthDelimited, StartGroup, …, Fixed32 } |
| boolList | |
| doubleList | |
| fixed32 | |
| fixed64 | |
| fixed32List | |
| fixed64List | |
| floatList | |
| int32 | |
| int64 | |
| int32List | |
| int64List | |
| sfixed32 | |
| sfixed64 | |
| sfixed32List | |
| sfixed64List | |
| sint32 | |
| sint64 | |
| sint32List | |
| sint64List | |
| uint32 | |
| uint64 | |
| uint32List | |
| uint64List |
| void | qRegisterProtobufEnumType() |
| void | qRegisterProtobufMapType() |
| void | qRegisterProtobufType() |
| void | qRegisterProtobufTypes() |
The WireTypes enumeration reflects protobuf default wiretypes.
The following table shows the values in the enumeration and their corresponding types:
| Constant | Value | Description |
|---|---|---|
QtProtobuf::WireTypes::Unknown |
-1 |
Invalid wire type |
QtProtobuf::WireTypes::Varint |
0 |
int32, int64, uint32, uint64, sint32, sint64, bool, enum |
QtProtobuf::WireTypes::Fixed64 |
1 |
fixed64, sfixed64, double |
QtProtobuf::WireTypes::LengthDelimited |
2 |
string, bytes, embedded messages, packed repeated fields |
QtProtobuf::WireTypes::StartGroup |
3 |
groups. Deprecated in proto syntax 3. Not supported by Qt Protobuf. |
QtProtobuf::WireTypes::EndGroup |
4 |
groups. Deprecated in proto syntax 3. Not supported by Qt Protobuf. |
QtProtobuf::WireTypes::Fixed32 |
5 |
fixed32, sfixed32, float |
See also encoding.
[alias] QtProtobuf::boolListAlias for a list of bool.
[alias] QtProtobuf::doubleListAlias for a list of double.
[alias] QtProtobuf::fixed32fixed32 is an unsigned 32-bit integer that is represented in protobuf as a fixed size 32-bit field, an alias for WireTypes::Fixed32.
[alias] QtProtobuf::fixed64fixed64 is an unsigned 64-bit integer that is represented in protobuf as a fixed size 64-bit field, an alias for WireTypes::Fixed64.
[alias] QtProtobuf::fixed32ListAlias for a list of QtProtobuf::fixed32.
[alias] QtProtobuf::fixed64ListAlias for a list of QtProtobuf::fixed64.
[alias] QtProtobuf::floatListAlias for a list of float.
[alias] QtProtobuf::int32int32 is a regular signed 32-bit integer that is represented in protobuf as a variable size integer, an alias for WireTypes::Varint.
[alias] QtProtobuf::int64int64 is a regular signed 64-bit integer that is represented in protobuf as a variable size integer, an alias for WireTypes::Varint.
[alias] QtProtobuf::int32ListAlias for a list of QtProtobuf::int32.
[alias] QtProtobuf::int64ListAlias for a list of QtProtobuf::int64.
[alias] QtProtobuf::sfixed32sfixed32 is a signed 32-bit integer that is represented in protobuf as a fixed size 32-bit field, an alias for WireTypes::Fixed32.
[alias] QtProtobuf::sfixed64sfixed64 is a signed 64-bit integer that is represented in protobuf as a fixed size 64-bit field, an alias for WireTypes::Fixed64.
[alias] QtProtobuf::sfixed32ListAlias for a list of QtProtobuf::sfixed32.
[alias] QtProtobuf::sfixed64ListAlias for a list of QtProtobuf::sfixed64.
[alias] QtProtobuf::sint32sint32 is a 32-bit integer with forced sign marker that is represented in protobuf as variable size integer, an alias for WireTypes::Varint. sint32 is serialized using ZigZag conversion to reduce size of negative numbers.
See also signed-integers.
[alias] QtProtobuf::sint64sint64 is a 64-bit integer with forced sign marker that is represented in protobuf as variable size integer, an alias for WireTypes::Varint. sint64 is serialized using ZigZag conversion to reduce size of negative numbers.
See also signed-integers.
[alias] QtProtobuf::sint32ListAlias for a list of QtProtobuf::sint32.
[alias] QtProtobuf::sint64ListAlias for a list of QtProtobuf::sint64.
[alias] QtProtobuf::uint32uint32 is an unsigned 32-bit integer that is represented in protobuf as variable size integer, an alias for WireTypes::Varint.
[alias] QtProtobuf::uint64uint64 is an unsigned 64-bit integer that is represented in protobuf as variable size integer, an alias for WireTypes::Varint.
[alias] QtProtobuf::uint32ListAlias for a list of QtProtobuf::uint32.
[alias] QtProtobuf::uint64ListAlias for a list of QtProtobuf::uint64.
Registers serializers for enumeration type T in QtProtobuf global serializers registry.
This function is normally called by generated code.
Registers a Protobuf map type K and V. V must be a QProtobufMessage. This function is normally
called by generated code.
Registers a Protobuf type T. This function is normally called by generated code.
Calling this function registers all, currently known, protobuf types with the serializer registry.
Note: Only since Qt 6.6.3 version you don't have to call this function manually, as it is called automatically. For earlier versions it's better to call it before serialization/deserialization attempt.