qtgrpc/cmake
Mårten Nordheim 7b1d7832a2 Add support for the google.protobuf.Any type
This also means adding another library; the Protobuf Well-Known types
library. No other types added from the collection at the moment.

The Any type is like QVariant or std::any in the sense that it can hold
any type. A small string is embedded along with the Any type upon
serializing. This corresponds to some URL, that can be used for
dynamically looking up definitions of types if wanted
(we don't support this), plus the object name.
We use the embedded object name to verify, upon attempting to
deserialize, that the objects are the same. The function is called
as<T>.
Some users may want a as_unchecked<T>, in the future, where we don't do
this, since different messages may be binary compatible but miss some
fields. And this is fine.
Further, the class also contains the raw bytes of its contained message.
We, quite simply, need to deserialize it to some type when requested.

Implementation consists of a helper-class which uses the "real class" we
generate when serializing or deserializing. At some point they could
potentially be collapsed together to avoid extra overhead. But then
the metadata fields need to be dynamically created or manually
maintained.
When asked to serialize/deserialize the class simply proxies calls to
the "real class" underneath

Fixes: QTBUG-103982
Change-Id: Ie9e833cd30aa58afbd5bdd1a9e9c83bdece6f685
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-14 16:00:23 +01:00
..
FindWrapProtobuf.cmake Add support for the google.protobuf.Any type 2023-02-14 16:00:23 +01:00
FindWrapProtoc.cmake Enable qtprotobufgen feature when cross-compiling 2022-11-24 10:20:31 +01:00
FindWrapgRPC.cmake Check required dependencies for gRPC before adding WrapgRPC library 2022-12-14 15:24:23 +01:00
FindWrapgRPCPlugin.cmake Introduce QtGrpc 2022-12-09 15:00:04 +01:00