Control Surface pin-t-adl
MIDI Control Surface library for Arduino
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. More...
 

Private Attributes

const T * buffer
 
const T *const end
 

Constructor & Destructor Documentation

◆ BufferPuller_()

BufferPuller_ ( const T *  buffer,
size_t  length 
)
inline

Definition at line 15 of file BufferPuller.hpp.

Member Function Documentation

◆ pull()

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

const T* buffer
private

Definition at line 31 of file BufferPuller.hpp.

◆ end

const T* const end
private

Definition at line 32 of file BufferPuller.hpp.


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