openMSX
Public Member Functions | List of all members
openmsx::CircularBuffer< T, MAXSIZE > Class Template Reference

#include <CircularBuffer.hh>

Inheritance diagram for openmsx::CircularBuffer< T, MAXSIZE >:
Inheritance graph
[legend]

Public Member Functions

constexpr CircularBuffer ()=default
 
constexpr void push_front (const T &element)
 
constexpr void push_front (T &&element)
 
constexpr void push_back (const T &element)
 
constexpr void push_back (T &&element)
 
constexpr T & pop_front ()
 
constexpr T & pop_back ()
 
constexpr T & operator[] (size_t pos)
 
constexpr const T & operator[] (size_t pos) const
 
constexpr T & front ()
 
constexpr const T & front () const
 
constexpr T & back ()
 
constexpr const T & back () const
 
constexpr bool empty () const
 
constexpr bool full () const
 
constexpr size_t size () const
 
void clear ()
 

Detailed Description

template<typename T, size_t MAXSIZE>
class openmsx::CircularBuffer< T, MAXSIZE >

Definition at line 12 of file CircularBuffer.hh.

Constructor & Destructor Documentation

◆ CircularBuffer()

template<typename T , size_t MAXSIZE>
constexpr openmsx::CircularBuffer< T, MAXSIZE >::CircularBuffer ( )
constexprdefault

Member Function Documentation

◆ back() [1/2]

template<typename T , size_t MAXSIZE>
constexpr T & openmsx::CircularBuffer< T, MAXSIZE >::back ( )
inlineconstexpr

◆ back() [2/2]

template<typename T , size_t MAXSIZE>
constexpr const T & openmsx::CircularBuffer< T, MAXSIZE >::back ( ) const
inlineconstexpr

Definition at line 73 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::back().

◆ clear()

template<typename T , size_t MAXSIZE>
void openmsx::CircularBuffer< T, MAXSIZE >::clear ( )
inline

Definition at line 91 of file CircularBuffer.hh.

◆ empty()

template<typename T , size_t MAXSIZE>
constexpr bool openmsx::CircularBuffer< T, MAXSIZE >::empty ( ) const
inlineconstexpr

◆ front() [1/2]

template<typename T , size_t MAXSIZE>
constexpr T & openmsx::CircularBuffer< T, MAXSIZE >::front ( )
inlineconstexpr

◆ front() [2/2]

template<typename T , size_t MAXSIZE>
constexpr const T & openmsx::CircularBuffer< T, MAXSIZE >::front ( ) const
inlineconstexpr

Definition at line 65 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::front().

◆ full()

template<typename T , size_t MAXSIZE>
constexpr bool openmsx::CircularBuffer< T, MAXSIZE >::full ( ) const
inlineconstexpr

◆ operator[]() [1/2]

template<typename T , size_t MAXSIZE>
constexpr T & openmsx::CircularBuffer< T, MAXSIZE >::operator[] ( size_t  pos)
inlineconstexpr

Definition at line 49 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::size().

◆ operator[]() [2/2]

template<typename T , size_t MAXSIZE>
constexpr const T & openmsx::CircularBuffer< T, MAXSIZE >::operator[] ( size_t  pos) const
inlineconstexpr

Definition at line 57 of file CircularBuffer.hh.

◆ pop_back()

template<typename T , size_t MAXSIZE>
constexpr T & openmsx::CircularBuffer< T, MAXSIZE >::pop_back ( )
inlineconstexpr

◆ pop_front()

template<typename T , size_t MAXSIZE>
constexpr T & openmsx::CircularBuffer< T, MAXSIZE >::pop_front ( )
inlineconstexpr

Definition at line 37 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::empty().

Referenced by TEST_CASE().

◆ push_back() [1/2]

template<typename T , size_t MAXSIZE>
constexpr void openmsx::CircularBuffer< T, MAXSIZE >::push_back ( const T &  element)
inlineconstexpr

Definition at line 27 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::full().

Referenced by TEST_CASE().

◆ push_back() [2/2]

template<typename T , size_t MAXSIZE>
constexpr void openmsx::CircularBuffer< T, MAXSIZE >::push_back ( T &&  element)
inlineconstexpr

Definition at line 32 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::full().

◆ push_front() [1/2]

template<typename T , size_t MAXSIZE>
constexpr void openmsx::CircularBuffer< T, MAXSIZE >::push_front ( const T &  element)
inlineconstexpr

◆ push_front() [2/2]

template<typename T , size_t MAXSIZE>
constexpr void openmsx::CircularBuffer< T, MAXSIZE >::push_front ( T &&  element)
inlineconstexpr

Definition at line 22 of file CircularBuffer.hh.

References openmsx::CircularBuffer< T, MAXSIZE >::full().

◆ size()

template<typename T , size_t MAXSIZE>
constexpr size_t openmsx::CircularBuffer< T, MAXSIZE >::size ( ) const
inlineconstexpr

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