Any Class
class QtProtobuf::AnyA helper class to simplify working with the protobuf Any type. More...
Header: | #include <Any> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS ProtobufWellKnownTypes) target_link_libraries(mytarget PRIVATE Qt6::ProtobufWellKnownTypes) |
qmake: | QT += protobufwellknowntypes |
Since: | Qt 6.6 |
Inherits: | QProtobufMessage |
Status: | Technical Preview |
This class is equality-comparable.
Public Functions
~Any() | |
int | setTypeUrl(const class QString &typeUrl) |
int | setValue(const class QByteArray &value) |
Detailed Description
The Any class enables easy casting to and from other types using as() and fromMessage().
It is the type used in code generated by qtprotobufgen when a message contains a field of the google.protobuf.Any
type.
Member Function Documentation
[noexcept]
Any::~Any()
Destroys this instance of Any
int Any::setTypeUrl(const class QString &typeUrl)
Sets the type URL for the data contained to typeUrl.
Note: No verification is performed on the input to test if it's correct or in a valid format.
Note: Setter function for property typeUrl.
See also typeUrl() and fromMessage().
int Any::setValue(const class QByteArray &value)
Sets the raw bytes of the value stored to value.
value must be the output of serializing a message.
Note: Setter function for property value.
See also value() and fromMessage().