Circular buffer class template. More...
#include <cmsis-plus/posix-driver/circular-buffer.h>
Public Types | |
using | value_type = T |
Standard type definition. | |
Public Member Functions | |
Constructors & Destructor | |
circular_buffer (const value_type *buf, std::size_t size, std::size_t high_water_mark, std::size_t low_water_mark=0) | |
circular_buffer (const value_type *buf, std::size_t size) | |
~circular_buffer () | |
Public Member Functions | |
void | clear (void) |
const value_type & | operator[] (std::size_t idx) const |
std::size_t | push_back (value_type v) |
std::size_t | push_back (const value_type *buf, std::size_t count) |
std::size_t | advance_back (std::size_t count) |
void | retreat_back (void) |
std::size_t | pop_front (value_type *buf) |
std::size_t | pop_front (value_type *buf, std::size_t size) |
std::size_t | advance_front (std::size_t count) |
std::size_t | front_contiguous_buffer (value_type **ppbuf) |
std::size_t | back_contiguous_buffer (value_type **ppbuf) |
bool | empty (void) const |
bool | full (void) const |
bool | above_high_water_mark (void) const |
bool | below_high_water_mark (void) const |
bool | above_low_water_mark (void) const |
bool | below_low_water_mark (void) const |
std::size_t | length (void) const |
std::size_t | size (void) const |
void | dump (void) |
Circular buffer class template.
Definition at line 52 of file circular-buffer.h.
using os::posix::circular_buffer< T >::value_type = T |
Standard type definition.
Definition at line 61 of file circular-buffer.h.
os::posix::circular_buffer< T >::circular_buffer | ( | const value_type * | buf, |
std::size_t | size, | ||
std::size_t | high_water_mark, | ||
std::size_t | low_water_mark = 0 |
||
) |
Definition at line 226 of file circular-buffer.h.
os::posix::circular_buffer< T >::circular_buffer | ( | const value_type * | buf, |
std::size_t | size | ||
) |
Definition at line 241 of file circular-buffer.h.
os::posix::circular_buffer< T >::~circular_buffer |
Definition at line 250 of file circular-buffer.h.
|
inline |
Definition at line 292 of file circular-buffer.h.
|
inline |
Definition at line 315 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::advance_back | ( | std::size_t | count | ) |
Definition at line 398 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::advance_front | ( | std::size_t | count | ) |
Definition at line 499 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::back_contiguous_buffer | ( | value_type ** | ppbuf | ) |
Definition at line 544 of file circular-buffer.h.
|
inline |
Definition at line 308 of file circular-buffer.h.
|
inline |
Definition at line 300 of file circular-buffer.h.
void os::posix::circular_buffer< T >::clear | ( | void | ) |
Definition at line 259 of file circular-buffer.h.
void os::posix::circular_buffer< T >::dump | ( | void | ) |
Definition at line 562 of file circular-buffer.h.
|
inline |
Definition at line 278 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::front_contiguous_buffer | ( | value_type ** | ppbuf | ) |
Definition at line 525 of file circular-buffer.h.
|
inline |
Definition at line 285 of file circular-buffer.h.
|
inline |
Definition at line 322 of file circular-buffer.h.
|
inline |
Definition at line 271 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::pop_front | ( | value_type * | buf | ) |
Definition at line 440 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::pop_front | ( | value_type * | buf, |
std::size_t | size | ||
) |
Definition at line 464 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::push_back | ( | const value_type * | buf, |
std::size_t | count | ||
) |
Definition at line 357 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::push_back | ( | value_type | v | ) |
Definition at line 336 of file circular-buffer.h.
void os::posix::circular_buffer< T >::retreat_back | ( | void | ) |
Definition at line 424 of file circular-buffer.h.
|
inline |
Definition at line 329 of file circular-buffer.h.