WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
wpi::DirectUnpackCallback< T, U, N > Class Template Reference

A callback method that will directly unpack elements into the specified vector like data structure. More...

#include <wpi/protobuf/ProtobufCallbacks.h>

Public Member Functions

 DirectUnpackCallback (U &storage)
 Constructs a callback from a vector like type.
 
 DirectUnpackCallback (const DirectUnpackCallback &)=delete
 
 DirectUnpackCallback (DirectUnpackCallback &&)=delete
 
DirectUnpackCallbackoperator= (const DirectUnpackCallback &)=delete
 
DirectUnpackCallbackoperator= (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.
 

Detailed Description

template<ProtoCallbackUnpackable T, typename U, size_t N = 1>
class wpi::DirectUnpackCallback< T, U, N >

A callback method that will directly unpack elements into the specified vector like data structure.

The size passed is the expected number of elements.

By default, any elements in the packed buffer past N will still be added to the vector.

Template Parameters
Tobject type
Uvector type to pack into
Nnumber of elements

Constructor & Destructor Documentation

◆ DirectUnpackCallback() [1/3]

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
wpi::DirectUnpackCallback< T, U, N >::DirectUnpackCallback ( U & storage)
inlineexplicit

Constructs a callback from a vector like type.

Parameters
storagethe vector to store into

◆ DirectUnpackCallback() [2/3]

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
wpi::DirectUnpackCallback< T, U, N >::DirectUnpackCallback ( const DirectUnpackCallback< T, U, N > & )
delete

◆ DirectUnpackCallback() [3/3]

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
wpi::DirectUnpackCallback< T, U, N >::DirectUnpackCallback ( DirectUnpackCallback< T, U, N > && )
delete

Member Function Documentation

◆ Callback()

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
pb_callback_t wpi::DirectUnpackCallback< T, U, N >::Callback ( ) const
inline

Gets the nanopb callback pointing to this object.

Returns
nanopb callback

◆ operator=() [1/2]

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
DirectUnpackCallback & wpi::DirectUnpackCallback< T, U, N >::operator= ( const DirectUnpackCallback< T, U, N > & )
delete

◆ operator=() [2/2]

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
DirectUnpackCallback & wpi::DirectUnpackCallback< T, U, N >::operator= ( DirectUnpackCallback< T, U, N > && )
delete

◆ SetLimits()

template<ProtoCallbackUnpackable T, typename U , size_t N = 1>
void wpi::DirectUnpackCallback< T, U, N >::SetLimits ( DecodeLimits limit)
inlinenoexcept

Set the limits on what happens if more elements exist in the buffer then expected.

Parameters
limitthe limit to set

The documentation for this class was generated from the following file: