Utility Ring Buffer imported from pichenettes/stmlib
#include <ringbuffer.h>
Public Member Functions | |
RingBuffer () | |
void | Init () |
size_t | capacity () const |
size_t | writable () const |
size_t | readable () const |
void | Write (T v) |
void | Overwrite (T v) |
T | Read () |
T | ImmediateRead () |
void | Flush () |
void | ImmediateRead (T *destination, size_t num_elements) |
void | Overwrite (const T *source, size_t num_elements) |
|
inline |
|
inline |
|
inline |
Flush the buffer
|
inline |
|
inline |
destination | & |
num_elements | & |
|
inline |
Initialize ringbuffer
|
inline |
source | 3 |
num_elements | & |
|
inline |
v | Value to overwrite |
|
inline |
|
inline |
|
inline |
|
inline |
v | Value to write |