WPILibC++ 2024.1.1-beta-4
wpi::MutableProtobufSerializable Concept Reference

Specifies that a type is capable of in-place protobuf deserialization. More...

#include <wpi/protobuf/Protobuf.h>

Concept definition

template<typename T>
requires(T* out, const google::protobuf::Message& msg) {
Protobuf<typename std::remove_cvref_t<T>>::UnpackInto(out, msg);
}
Specifies that a type is capable of in-place protobuf deserialization.
Definition: Protobuf.h:87
Specifies that a type is capable of protobuf serialization and deserialization.
Definition: Protobuf.h:65

Detailed Description

Specifies that a type is capable of in-place protobuf deserialization.

In addition to meeting ProtobufSerializable, implementations must define a wpi::Protobuf<T> static member void UnpackInto(T*, const google::protobuf::Message&) to update the pointed-to T with the contents of the message.