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 addFront (const T &element)
 
constexpr void addFront (T &&element)
 
constexpr void addBack (const T &element)
 
constexpr void addBack (T &&element)
 
constexpr T & removeFront ()
 
constexpr T & removeBack ()
 
constexpr T & operator[] (size_t pos)
 
constexpr const T & operator[] (size_t pos) const
 
constexpr bool isEmpty () const
 
constexpr bool isFull () 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

◆ addBack() [1/2]

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

Definition at line 27 of file CircularBuffer.hh.

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

Referenced by TEST_CASE().

◆ addBack() [2/2]

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

Definition at line 32 of file CircularBuffer.hh.

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

◆ addFront() [1/2]

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

◆ addFront() [2/2]

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

Definition at line 22 of file CircularBuffer.hh.

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

◆ clear()

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

Definition at line 73 of file CircularBuffer.hh.

◆ isEmpty()

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

◆ isFull()

template<typename T , size_t MAXSIZE>
constexpr bool openmsx::CircularBuffer< T, MAXSIZE >::isFull ( ) 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 48 of file CircularBuffer.hh.

◆ 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 56 of file CircularBuffer.hh.

◆ removeBack()

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

◆ removeFront()

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

Definition at line 37 of file CircularBuffer.hh.

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

Referenced by TEST_CASE().

◆ size()

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

Definition at line 65 of file CircularBuffer.hh.

Referenced by TEST_CASE().


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