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 클래스

프로토부프 Any 타입 작업을 단순화하기 위한 헬퍼 클래스입니다. 더 보기...

유형 문서

enum class QtProtobuf::WireTypes

WireTypes 열거형은 프로토뷰 기본 와이어타입을 반영합니다.

다음 표는 열거형에 포함된 값과 해당 유형을 보여줍니다:

상수설명
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그룹. 프로토 구문 3에서 더 이상 사용되지 않습니다. Qt Protobuf 에서 지원되지 않습니다.
QtProtobuf::WireTypes::EndGroup4그룹. 프로토 구문 3에서 더 이상 사용되지 않습니다. Qt Protobuf 에서 지원되지 않습니다.
QtProtobuf::WireTypes::Fixed325fixed32, sfixed32, float

인코딩도참조하십시오 .

[alias] QtProtobuf::boolList

bool 목록의 별칭입니다.

[alias] QtProtobuf::doubleList

이중 목록의 별칭입니다.

[alias] QtProtobuf::fixed32

fixed32는 부호가 없는 32비트 정수로, 프로토뷰에서 고정 크기 32비트 필드로 표시되며 WireTypes::Fixed32 의 별칭입니다.

[alias] QtProtobuf::fixed64

fixed64는 부호 없는 64비트 정수로, 프로토뷰에서 고정 크기 64비트 필드로 표시되며 WireTypes::Fixed64 의 별칭입니다.

[alias] QtProtobuf::fixed32List

목록의 별칭 QtProtobuf::fixed32.

[alias] QtProtobuf::fixed64List

목록의 별칭 QtProtobuf::fixed64.

[alias] QtProtobuf::floatList

플로트 목록의 별칭입니다.

[alias] QtProtobuf::int32

int32는 WireTypes::Varint 의 별칭인 가변 크기 정수로 프로토뷰에 표시되는 정규 부호화된 32비트 정수입니다.

[alias] QtProtobuf::int64

int64는 WireTypes::Varint 의 별칭인 가변 크기 정수로 프로토뷰에 표시되는 정규 부호화된 64비트 정수입니다.

[alias] QtProtobuf::int32List

목록의 별칭 QtProtobuf::int32.

[alias] QtProtobuf::int64List

목록의 별칭 QtProtobuf::int64.

[alias] QtProtobuf::sfixed32

sfixed32는 부호화된 32비트 정수로, 프로토뷰에서 고정 크기 32비트 필드로 표시되며 WireTypes::Fixed32 의 별칭입니다.

[alias] QtProtobuf::sfixed64

sfixed64는 부호화된 64비트 정수로, 프로토뷰에서 고정 크기 64비트 필드로 표시되며 WireTypes::Fixed64 의 별칭입니다.

[alias] QtProtobuf::sfixed32List

목록의 별칭 QtProtobuf::sfixed32.

[alias] QtProtobuf::sfixed64List

목록의 별칭 QtProtobuf::sfixed64.

[alias] QtProtobuf::sint32

sint32는 강제 부호 마커가 있는 32비트 정수로, 프로토뷰에서 가변 크기 정수로 표현되며 WireTypes::Varint 의 별칭입니다. sint32는 음수의 크기를 줄이기 위해 지그재그 변환을 사용하여 직렬화됩니다.

부호 있는 정수를참조하세요 .

[alias] QtProtobuf::sint64

sint64는 강제 부호 마커가 있는 64비트 정수로, 프로토뷰에서 가변 크기 정수로 표현되며 WireTypes::Varint 의 별칭입니다. sint64는 음수의 크기를 줄이기 위해 지그재그 변환을 사용하여 직렬화됩니다.

부호 있는 정수를참조하세요 .

[alias] QtProtobuf::sint32List

목록의 별칭 QtProtobuf::sint32.

[alias] QtProtobuf::sint64List

목록의 별칭 QtProtobuf::sint64.

[alias] QtProtobuf::uint32

uint32는 부호 없는 32비트 정수로, WireTypes::Varint 의 별칭인 가변 크기 정수로 프로토뷰에 표시됩니다.

[alias] QtProtobuf::uint64

uint64는 부호가 없는 64비트 정수로, 프로토뷰에서 가변 크기 정수로 표시되며 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()

QtProtobuf 글로벌 직렬화기 레지스트리에 열거형 T 유형에 대한 직렬화기를 등록합니다.

이 함수는 일반적으로 생성된 코드에서 호출됩니다.

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

Protobuf 맵 유형 KV 을 등록합니다. VQProtobufMessage 이어야 합니다. 이 함수는 일반적으로 생성된 코드에서 호출됩니다.

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

프로토부프 타입 T를 등록합니다. 이 함수는 일반적으로 생성된 코드에서 호출됩니다.

void qRegisterProtobufTypes()

이 함수를 호출하면 현재 알려진 모든 프로토비프 타입이 직렬화기 레지스트리에 등록됩니다.

참고: 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.