Public Member Functions | |
_T & | at (std::size_t pos) |
random access operator (with boundary checking) | |
void | clear () |
clears all recorded entries of this ringbuffer | |
_T & | getLast () |
returns the last inserted element | |
_T & | operator[] (std::size_t pos) |
random access operator (without boundary checking) | |
void | push (_T &val) |
adds an element to the ringbuffer | |
void | resize (std::size_t size) |
resizes the internal element container | |
RingBuffer (std::size_t maxSize=1) | |
void | setMaxSize (std::size_t size) |
sets the maximum size of this ringbuffer (maximum elements stored) | |
std::size_t | size () |
~RingBuffer () | |
destructor | |
Protected Attributes | |
std::vector< _T > | mData |
std::size_t | mMaxSize |
opentl::core::util::RingBuffer< _T >::RingBuffer | ( | std::size_t | maxSize = 1 |
) | [inline] |
opentl::core::util::RingBuffer< _T >::~RingBuffer | ( | ) | [inline] |
destructor
_T& opentl::core::util::RingBuffer< _T >::at | ( | std::size_t | pos | ) | [inline] |
random access operator (with boundary checking)
pos | index of the element |
void opentl::core::util::RingBuffer< _T >::clear | ( | ) | [inline] |
clears all recorded entries of this ringbuffer
_T& opentl::core::util::RingBuffer< _T >::getLast | ( | ) | [inline] |
returns the last inserted element
last | element inserted |
_T& opentl::core::util::RingBuffer< _T >::operator[] | ( | std::size_t | pos | ) | [inline] |
random access operator (without boundary checking)
pos | index of the element |
void opentl::core::util::RingBuffer< _T >::push | ( | _T & | val | ) | [inline] |
adds an element to the ringbuffer
val | element to be added |
void opentl::core::util::RingBuffer< _T >::resize | ( | std::size_t | size | ) | [inline] |
resizes the internal element container
size | new size |
void opentl::core::util::RingBuffer< _T >::setMaxSize | ( | std::size_t | size | ) | [inline] |
sets the maximum size of this ringbuffer (maximum elements stored)
size | max. number of elements |
std::size_t opentl::core::util::RingBuffer< _T >::size | ( | ) | [inline] |
std::vector<_T> opentl::core::util::RingBuffer< _T >::mData [protected] |
std::size_t opentl::core::util::RingBuffer< _T >::mMaxSize [protected] |