Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
BufferPuller_< T > Class Template Reference

#include <MIDI_Parsers/BufferPuller.hpp>

Detailed Description

template<class T = uint8_t>
class BufferPuller_< T >

Helper to pull bytes or other objects out of a buffer.

Definition at line 13 of file BufferPuller.hpp.

+ Collaboration diagram for BufferPuller_< T >:

Public Member Functions

 BufferPuller_ (const T *buffer, size_t length)
 
bool pull (T &output)
 Pull a value out of the buffer.
 

Private Attributes

const T * buffer
 
const T *const end
 

Constructor & Destructor Documentation

◆ BufferPuller_()

template<class T = uint8_t>
BufferPuller_ ( const T * buffer,
size_t length )
inline

Definition at line 15 of file BufferPuller.hpp.

Member Function Documentation

◆ pull()

template<class T = uint8_t>
bool pull ( T & output)
inline

Pull a value out of the buffer.

Parameters
[out]outputA new value from the buffer (if available).
Returns
True if a value was available, false otherwise.

Definition at line 22 of file BufferPuller.hpp.

Member Data Documentation

◆ buffer

template<class T = uint8_t>
const T* buffer
private

Definition at line 31 of file BufferPuller.hpp.

◆ end

template<class T = uint8_t>
const T* const end
private

Definition at line 32 of file BufferPuller.hpp.


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