|
emlabcpp
modern opinionated embedded C++ library
|
Strategy for managing indices in circular buffer via empty slot. More...
#include <static_circular_buffer.h>
Public Types | |
| using | index_type = decltype(_select_index_type< N >()) |
| using | size_type = typename index_type::value_type |
Public Member Functions | |
| void | incr_front () noexcept |
| void | incr_front (size_type n) noexcept |
| auto | front_idx () const noexcept |
| void | incr_back () noexcept |
| void | incr_back (size_type n) noexcept |
| auto | back_idx () const noexcept |
| size_type | size () const noexcept |
| bool | empty () const noexcept |
| bool | full () const noexcept |
| index_type | last_idx () const noexcept |
Static Public Attributes | |
| static constexpr std::size_t | max_size = N + 1 |
Strategy for managing indices in circular buffer via empty slot.
This strategy uses one slot as empty slot to distinguish between full and empty buffer. Thus the maximum number of storable elements is N-1 where N is the size of the buffer.
| using emlabcpp::_spacer_strategy< N >::index_type = decltype( _select_index_type< N >() ) |
| using emlabcpp::_spacer_strategy< N >::size_type = typename index_type::value_type |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
References emlabcpp::N, and emlabcpp::_spacer_strategy< N >::size().
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
inlinenoexcept |
References emlabcpp::_spacer_strategy< N >::max_size.
|
staticconstexpr |