Loading [MathJax]/extensions/tex2jax.js
WPILibC++ 2025.3.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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, wpi::ProtoInputStream<T>& istream) {
{
Protobuf<typename std::remove_cvref_t<T>>::UnpackInto(out, istream)
} -> std::same_as<bool>;
}
Class for wrapping a nanopb istream.
Definition Protobuf.h:55
Specifies that a type is capable of in-place protobuf deserialization.
Definition Protobuf.h:282
Specifies that a type is capable of protobuf serialization and deserialization.
Definition Protobuf.h:251

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

  • bool UnpackInto(T*, wpi::ProtoInputStream<T>&)` to update the pointed-to T with the contents of the message.