IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QProtobufSerializer Class

The QProtobufSerializer class is interface that represents basic functions for serialization/deserialization.

This class was introduced in Qt 6.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QProtobufSerializer Class

  • Header: QProtobufSerializer

  • Since: Qt 6.5

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Protobuf)

    target_link_libraries(mytarget PRIVATE Qt6::Protobuf)

  • Inherits: QProtobufBaseSerializer

Detailed Description

The QProtobufSerializer class registers serializers/deserializers for classes implementing a protobuf message, inheriting QProtobufMessage. These classes are generated automatically, based on a .proto file, using the CMake function qt_add_protobuf or by running qtprotobufgen directly.

Member Function Documentation

 

QProtobufSerializer::QProtobufSerializer()

Constructs a new serializer instance.

[override virtual] QProtobufSerializer::~QProtobufSerializer()

Destroys the serializer instance.

[override virtual] QProtobufSerializer::DeserializationError QProtobufSerializer::deserializationError() const

Returns the last deserialization error.

[override virtual] QString QProtobufSerializer::deserializationErrorString() const

Returns a human-readable string describing the last deserialization error. If there was no error, an empty string is returned.

[since 6.7] void QProtobufSerializer::shouldPreserveUnknownFields(bool preserveUnknownFields)

Controls whether the unknown fields received from the wire should be stored in the resulting message or if it should be omitted, based on preserveUnknownFields.

This function was introduced in Qt 6.7.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+