A templated class for a circular buffer. The implementation is header-only. Currently the structure supports push/emplace at front and checks for full/capacity/size. The iterators are only forward. Addition of elements is at the front. Removal is at the back.
More...
#include <CircularBuffer.hpp>
template<class T, typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
class NES::CircularBuffer< T, Allocator, >
A templated class for a circular buffer. The implementation is header-only. Currently the structure supports push/emplace at front and checks for full/capacity/size. The iterators are only forward. Addition of elements is at the front. Removal is at the back.
Refs:
- Template Parameters
-
T | - type of the value in the buffer slots. |
◆ allocator_type
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ const_iterator
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ const_reference
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ difference_type
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ iterator
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ pointer
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ reference
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ uint64_type
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ value_type
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ CircularBuffer() [1/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
The ctor of the circ buffer, takes a size parameter.
- Parameters
-
size | of the internal buffer |
◆ CircularBuffer() [2/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ CircularBuffer() [3/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ ~CircularBuffer()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ at() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ at() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ back() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ back() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ begin() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ begin() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ capacity()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ cbegin()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ cend()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ emplace()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
template<typename... Args>
◆ empty()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ end() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ end() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ front() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ front() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ full()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ operator=() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ operator=() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ operator[]() [1/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ operator[]() [2/2]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ pop()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
◆ push() [1/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
template<bool b = true, typename = std::enable_if_t<b && std::is_copy_assignable<T>::value>>
◆ push() [2/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
template<bool b = true, typename = std::enable_if_t<b && std::is_move_assignable<T>::value>>
◆ push() [3/3]
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
template<bool b = true, typename = std::enable_if_t<b && std::is_move_assignable<T>::value>>
◆ size()
template<class T , typename Allocator = std::allocator<T>, std::enable_if_t< std::is_arithmetic< T >::value||std::is_pointer< T >::value, int > = 0>
The documentation for this class was generated from the following file: