openMSX
Public Types | Public Member Functions | List of all members
cb_queue< T > Class Template Reference

This implements a queue on top of circular_buffer (not part of boost). More...

#include <circular_buffer.hh>

Inheritance diagram for cb_queue< T >:
Inheritance graph
[legend]

Public Types

using value_type = typename circular_buffer< T >::value_type
 
using iterator = typename circular_buffer< T >::iterator
 
using const_iterator = typename circular_buffer< T >::const_iterator
 
using reverse_iterator = typename circular_buffer< T >::reverse_iterator
 
using const_reverse_iterator = typename circular_buffer< T >::const_reverse_iterator
 

Public Member Functions

 cb_queue ()=default
 
 cb_queue (size_t capacity)
 
template<typename U >
void push_back (U &&u)
 
template<typename U >
void push_back (std::initializer_list< U > list)
 
pop_front ()
 
const T & front () const
 
const T & back () const
 
const T & operator[] (size_t i) const
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
auto rbegin ()
 
auto rbegin () const
 
auto rend ()
 
auto rend () const
 
size_t size () const
 
bool empty () const
 
void clear ()
 
auto & getBuffer ()
 
auto & getBuffer () const
 

Detailed Description

template<typename T>
class cb_queue< T >

This implements a queue on top of circular_buffer (not part of boost).

It will automatically grow the buffer when its capacity is too small while inserting new elements.

Definition at line 334 of file circular_buffer.hh.

Member Typedef Documentation

◆ const_iterator

template<typename T >
using cb_queue< T >::const_iterator = typename circular_buffer<T>::const_iterator

Definition at line 339 of file circular_buffer.hh.

◆ const_reverse_iterator

template<typename T >
using cb_queue< T >::const_reverse_iterator = typename circular_buffer<T>::const_reverse_iterator

Definition at line 341 of file circular_buffer.hh.

◆ iterator

template<typename T >
using cb_queue< T >::iterator = typename circular_buffer<T>::iterator

Definition at line 338 of file circular_buffer.hh.

◆ reverse_iterator

template<typename T >
using cb_queue< T >::reverse_iterator = typename circular_buffer<T>::reverse_iterator

Definition at line 340 of file circular_buffer.hh.

◆ value_type

template<typename T >
using cb_queue< T >::value_type = typename circular_buffer<T>::value_type

Definition at line 337 of file circular_buffer.hh.

Constructor & Destructor Documentation

◆ cb_queue() [1/2]

template<typename T >
cb_queue< T >::cb_queue ( )
default

◆ cb_queue() [2/2]

template<typename T >
cb_queue< T >::cb_queue ( size_t  capacity)
inlineexplicit

Definition at line 344 of file circular_buffer.hh.

Member Function Documentation

◆ back()

template<typename T >
const T & cb_queue< T >::back ( ) const
inline

Definition at line 362 of file circular_buffer.hh.

◆ begin() [1/2]

template<typename T >
auto cb_queue< T >::begin ( )
inline

Definition at line 365 of file circular_buffer.hh.

◆ begin() [2/2]

template<typename T >
auto cb_queue< T >::begin ( ) const
inline

Definition at line 367 of file circular_buffer.hh.

◆ clear()

template<typename T >
void cb_queue< T >::clear ( )
inline

◆ empty()

template<typename T >
bool cb_queue< T >::empty ( ) const
inline

◆ end() [1/2]

template<typename T >
auto cb_queue< T >::end ( )
inline

Definition at line 366 of file circular_buffer.hh.

◆ end() [2/2]

template<typename T >
auto cb_queue< T >::end ( ) const
inline

Definition at line 368 of file circular_buffer.hh.

◆ front()

template<typename T >
const T & cb_queue< T >::front ( ) const
inline

Definition at line 361 of file circular_buffer.hh.

Referenced by openmsx::NowindHost::peek().

◆ getBuffer() [1/2]

template<typename T >
auto & cb_queue< T >::getBuffer ( )
inline

◆ getBuffer() [2/2]

template<typename T >
auto & cb_queue< T >::getBuffer ( ) const
inline

Definition at line 379 of file circular_buffer.hh.

◆ operator[]()

template<typename T >
const T & cb_queue< T >::operator[] ( size_t  i) const
inline

Definition at line 363 of file circular_buffer.hh.

◆ pop_front()

template<typename T >
T cb_queue< T >::pop_front ( )
inline

◆ push_back() [1/2]

template<typename T >
template<typename U >
void cb_queue< T >::push_back ( std::initializer_list< U >  list)
inline

Definition at line 351 of file circular_buffer.hh.

References cb_queue< T >::push_back().

◆ push_back() [2/2]

template<typename T >
template<typename U >
void cb_queue< T >::push_back ( U &&  u)
inline

◆ rbegin() [1/2]

template<typename T >
auto cb_queue< T >::rbegin ( )
inline

Definition at line 369 of file circular_buffer.hh.

◆ rbegin() [2/2]

template<typename T >
auto cb_queue< T >::rbegin ( ) const
inline

Definition at line 370 of file circular_buffer.hh.

◆ rend() [1/2]

template<typename T >
auto cb_queue< T >::rend ( )
inline

Definition at line 371 of file circular_buffer.hh.

◆ rend() [2/2]

template<typename T >
auto cb_queue< T >::rend ( ) const
inline

Definition at line 372 of file circular_buffer.hh.

◆ size()

template<typename T >
size_t cb_queue< T >::size ( ) const
inline

Definition at line 374 of file circular_buffer.hh.


The documentation for this class was generated from the following file: