auxiliary
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
auxiliary::circular_buffer< T > Class Template Reference

A minimal implementation of circular buffer class. More...

#include <circular_buffer.hpp>

Public Member Functions

 circular_buffer (const size_type n)
 
reference next ()
 Get next element in the circular buffer. More...
 
void push_back (const value_type &item)
 Add new last element. More...
 
reference front ()
 Accesses the first element. More...
 
const_reference front () const
 Accesses the first element. More...
 
reference back ()
 Accesses the last element. More...
 
const_reference back () const
 Access the last element. More...
 
const_reference operator[] (size_type i) const
 Accesses the element. More...
 
reference operator[] (size_type i)
 Accesses the element. More...
 
void clear ()
 Removes all elements. More...
 
size_type size () const
 Counts the number of elements. More...
 

Detailed Description

template<typename T>
class auxiliary::circular_buffer< T >

A minimal implementation of circular buffer class.

Constructor & Destructor Documentation

template<typename T>
auxiliary::circular_buffer< T >::circular_buffer ( const size_type  n)
inlineexplicit

Member Function Documentation

template<typename T>
reference auxiliary::circular_buffer< T >::back ( )
inline

Accesses the last element.

template<typename T>
const_reference auxiliary::circular_buffer< T >::back ( ) const
inline

Access the last element.

template<typename T>
void auxiliary::circular_buffer< T >::clear ( )
inline

Removes all elements.

template<typename T>
reference auxiliary::circular_buffer< T >::front ( )
inline

Accesses the first element.

template<typename T>
const_reference auxiliary::circular_buffer< T >::front ( ) const
inline

Accesses the first element.

template<typename T>
reference auxiliary::circular_buffer< T >::next ( )
inline

Get next element in the circular buffer.

template<typename T>
const_reference auxiliary::circular_buffer< T >::operator[] ( size_type  i) const
inline

Accesses the element.

template<typename T>
reference auxiliary::circular_buffer< T >::operator[] ( size_type  i)
inline

Accesses the element.

template<typename T>
void auxiliary::circular_buffer< T >::push_back ( const value_type &  item)
inline

Add new last element.

template<typename T>
size_type auxiliary::circular_buffer< T >::size ( ) const
inline

Counts the number of elements.


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