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 37 of file circular-buffer.h.
using os::posix::circular_buffer< T >::value_type = T |
Standard type definition.
Definition at line 46 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 211 of file circular-buffer.h.
os::posix::circular_buffer< T >::circular_buffer | ( | const value_type * | buf, |
std::size_t | size | ||
) |
Definition at line 226 of file circular-buffer.h.
os::posix::circular_buffer< T >::~circular_buffer |
Definition at line 235 of file circular-buffer.h.
|
inline |
Definition at line 277 of file circular-buffer.h.
|
inline |
Definition at line 300 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::advance_back | ( | std::size_t | count | ) |
Definition at line 383 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::advance_front | ( | std::size_t | count | ) |
Definition at line 484 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::back_contiguous_buffer | ( | value_type ** | ppbuf | ) |
Definition at line 529 of file circular-buffer.h.
|
inline |
Definition at line 293 of file circular-buffer.h.
|
inline |
Definition at line 285 of file circular-buffer.h.
void os::posix::circular_buffer< T >::clear | ( | void | ) |
Definition at line 244 of file circular-buffer.h.
void os::posix::circular_buffer< T >::dump | ( | void | ) |
Definition at line 547 of file circular-buffer.h.
|
inline |
Definition at line 263 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::front_contiguous_buffer | ( | value_type ** | ppbuf | ) |
Definition at line 510 of file circular-buffer.h.
|
inline |
Definition at line 270 of file circular-buffer.h.
|
inline |
Definition at line 307 of file circular-buffer.h.
|
inline |
Definition at line 256 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::pop_front | ( | value_type * | buf | ) |
Definition at line 425 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 449 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 342 of file circular-buffer.h.
std::size_t os::posix::circular_buffer< T >::push_back | ( | value_type | v | ) |
Definition at line 321 of file circular-buffer.h.
void os::posix::circular_buffer< T >::retreat_back | ( | void | ) |
Definition at line 409 of file circular-buffer.h.
|
inline |
Definition at line 314 of file circular-buffer.h.