openMSX
|
Circular buffer class, based on boost::circular_buffer/. More...
#include <circular_buffer.hh>
Public Types | |
using | iterator = cb_iterator< circular_buffer< T >, T > |
using | const_iterator = cb_iterator< circular_buffer< T >, const T > |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | value_type = T |
using | pointer = T * |
using | reference = T & |
using | difference_type = ptrdiff_t |
using | size_type = size_t |
Public Member Functions | |
circular_buffer ()=default | |
circular_buffer (size_t buffer_capacity) | |
circular_buffer (const circular_buffer &cb) | |
circular_buffer (circular_buffer &&cb) noexcept | |
~circular_buffer () | |
circular_buffer & | operator= (const circular_buffer &cb) |
circular_buffer & | operator= (circular_buffer &&cb) noexcept |
void | swap (circular_buffer &cb) noexcept |
auto | begin () |
auto | begin () const |
auto | end () |
auto | end () const |
auto | rbegin () |
auto | rbegin () const |
auto | rend () |
auto | rend () const |
auto & | operator[] (size_t i) |
auto & | operator[] (size_t i) const |
auto & | front () |
auto & | front () const |
auto & | back () |
auto & | back () const |
size_t | size () const |
bool | empty () const |
bool | full () const |
size_t | reserve () const |
size_t | capacity () const |
void | set_capacity (size_t new_capacity) |
template<typename T2 > | |
void | push_back (T2 &&t) |
template<typename T2 > | |
void | push_front (T2 &&t) |
void | push_back (std::initializer_list< T > list) |
void | pop_back () |
void | pop_front () |
void | clear () |
Friends | |
template<typename BUF , typename T2 > | |
class | cb_iterator |
Circular buffer class, based on boost::circular_buffer/.
Definition at line 92 of file circular_buffer.hh.
using circular_buffer< T >::const_iterator = cb_iterator<circular_buffer<T>, const T> |
Definition at line 96 of file circular_buffer.hh.
using circular_buffer< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 98 of file circular_buffer.hh.
using circular_buffer< T >::difference_type = ptrdiff_t |
Definition at line 102 of file circular_buffer.hh.
using circular_buffer< T >::iterator = cb_iterator<circular_buffer<T>, T> |
Definition at line 95 of file circular_buffer.hh.
using circular_buffer< T >::pointer = T* |
Definition at line 100 of file circular_buffer.hh.
using circular_buffer< T >::reference = T& |
Definition at line 101 of file circular_buffer.hh.
using circular_buffer< T >::reverse_iterator = std::reverse_iterator< iterator> |
Definition at line 97 of file circular_buffer.hh.
using circular_buffer< T >::size_type = size_t |
Definition at line 103 of file circular_buffer.hh.
using circular_buffer< T >::value_type = T |
Definition at line 99 of file circular_buffer.hh.
|
default |
Referenced by circular_buffer< T >::operator=().
|
inlineexplicit |
Definition at line 108 of file circular_buffer.hh.
|
inline |
Definition at line 115 of file circular_buffer.hh.
References circular_buffer< T >::begin(), circular_buffer< T >::capacity(), and circular_buffer< T >::end().
|
inlinenoexcept |
Definition at line 130 of file circular_buffer.hh.
|
inline |
Definition at line 135 of file circular_buffer.hh.
|
inline |
Definition at line 185 of file circular_buffer.hh.
|
inline |
Definition at line 186 of file circular_buffer.hh.
|
inline |
Definition at line 167 of file circular_buffer.hh.
References circular_buffer< T >::empty().
Referenced by circular_buffer< T >::circular_buffer(), circular_buffer< T >::operator=(), circular_buffer< T >::rend(), circular_buffer< T >::rend(), and circular_buffer< T >::set_capacity().
|
inline |
Definition at line 170 of file circular_buffer.hh.
References circular_buffer< T >::empty().
|
inline |
Definition at line 192 of file circular_buffer.hh.
Referenced by circular_buffer< T >::circular_buffer(), circular_buffer< T >::full(), circular_buffer< T >::operator=(), circular_buffer< T >::reserve(), and circular_buffer< T >::set_capacity().
|
inline |
Definition at line 244 of file circular_buffer.hh.
References circular_buffer< T >::size().
Referenced by TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 189 of file circular_buffer.hh.
References circular_buffer< T >::size().
Referenced by circular_buffer< T >::begin(), and circular_buffer< T >::begin().
|
inline |
Definition at line 173 of file circular_buffer.hh.
Referenced by circular_buffer< T >::circular_buffer(), circular_buffer< T >::operator=(), circular_buffer< T >::rbegin(), and circular_buffer< T >::rbegin().
|
inline |
Definition at line 174 of file circular_buffer.hh.
|
inline |
Definition at line 183 of file circular_buffer.hh.
|
inline |
Definition at line 184 of file circular_buffer.hh.
|
inline |
Definition at line 190 of file circular_buffer.hh.
References circular_buffer< T >::capacity(), and circular_buffer< T >::size().
|
inlinenoexcept |
Definition at line 153 of file circular_buffer.hh.
References circular_buffer< T >::circular_buffer(), and circular_buffer< T >::swap().
|
inline |
Definition at line 139 of file circular_buffer.hh.
References circular_buffer< T >::begin(), circular_buffer< T >::capacity(), and circular_buffer< T >::end().
|
inline |
Definition at line 180 of file circular_buffer.hh.
|
inline |
Definition at line 181 of file circular_buffer.hh.
|
inline |
Definition at line 232 of file circular_buffer.hh.
Referenced by TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 238 of file circular_buffer.hh.
Referenced by TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 228 of file circular_buffer.hh.
References circular_buffer< T >::push_back().
Definition at line 210 of file circular_buffer.hh.
References t.
Referenced by circular_buffer< T >::push_back(), TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 217 of file circular_buffer.hh.
References t.
Referenced by TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 175 of file circular_buffer.hh.
References circular_buffer< T >::end().
|
inline |
Definition at line 176 of file circular_buffer.hh.
References circular_buffer< T >::end().
|
inline |
Definition at line 177 of file circular_buffer.hh.
References circular_buffer< T >::begin().
|
inline |
Definition at line 178 of file circular_buffer.hh.
References circular_buffer< T >::begin().
|
inline |
Definition at line 191 of file circular_buffer.hh.
References circular_buffer< T >::capacity(), and circular_buffer< T >::size().
|
inline |
Definition at line 194 of file circular_buffer.hh.
References circular_buffer< T >::begin(), circular_buffer< T >::capacity(), and circular_buffer< T >::size().
Referenced by TEST_CASE(), and TEST_CASE().
|
inline |
Definition at line 188 of file circular_buffer.hh.
Referenced by circular_buffer< T >::clear(), circular_buffer< T >::empty(), circular_buffer< T >::full(), circular_buffer< T >::reserve(), and circular_buffer< T >::set_capacity().
|
inlinenoexcept |
Definition at line 159 of file circular_buffer.hh.
Referenced by circular_buffer< T >::operator=().
Definition at line 327 of file circular_buffer.hh.