29using std::range_error;
37template <
typename T,
unsigned int Size>
40 static_assert(
Size > 0,
"Circular buffer size must be greater than 0!");
81 T&
get(
unsigned int i = 0)
96 throw range_error(
"Circular buffer index out of range");
129 throw range_error(
"Circular buffer is empty!");
virtual ~CircularBuffer()
T & put(const T &elem)
Puts a copy of the element in the buffer.
size_t getSize() const
Returns the maximum number of elements that can be stored in the buffer.
T & last()
Returns the last element added in the buffer.
size_t count() const
Counts the elements in the buffer.
const T & pop()
Pops the first element in the buffer.
T & get(unsigned int i=0)
Gets an element from the buffer, without removing it.
This file includes all the types the logdecoder script will decode.