WPILibC++ 2025.1.1
|
A DirectUnpackCallback backed by a std::vector. More...
#include <wpi/protobuf/ProtobufCallbacks.h>
Public Member Functions | |
StdVectorUnpackCallback () | |
Constructs a StdVectorUnpackCallback. | |
std::span< T > | Items () noexcept |
Gets a span pointing to the storage buffer. | |
std::span< const T > | Items () const noexcept |
Gets a const span pointing to the storage buffer. | |
std::vector< T > & | Vec () noexcept |
Gets a reference to the backing vector. | |
Public Member Functions inherited from wpi::DirectUnpackCallback< T, std::vector< T >, 1 > | |
DirectUnpackCallback (std::vector< T > &storage) | |
Constructs a callback from a vector like type. | |
DirectUnpackCallback (const DirectUnpackCallback &)=delete | |
DirectUnpackCallback (DirectUnpackCallback &&)=delete | |
DirectUnpackCallback & | operator= (const DirectUnpackCallback &)=delete |
DirectUnpackCallback & | operator= (DirectUnpackCallback &&)=delete |
void | SetLimits (DecodeLimits limit) noexcept |
Set the limits on what happens if more elements exist in the buffer then expected. | |
pb_callback_t | Callback () const |
Gets the nanopb callback pointing to this object. | |
A DirectUnpackCallback backed by a std::vector.
By default, any elements in the packed buffer past N will be ignored, but decoding will still succeed
T | object type |
N | number of expected elements |
|
inline |
Constructs a StdVectorUnpackCallback.
|
inlinenoexcept |
Gets a const span pointing to the storage buffer.
|
inlinenoexcept |
Gets a span pointing to the storage buffer.
|
inlinenoexcept |
Gets a reference to the backing vector.