Dataflow Runtime API
3.1.1.0
|
This template class implements a FIFO ringbuffer. More...
#include <Imt.Base.Core.Util/RingBuffer.h>
Public Types | |
enum | Constants { Constants_BufferSize = BufferSize } |
Constants. More... | |
typedef ElementType | ValueType |
The type of the values/elements in this buffer. More... | |
Public Member Functions | |
RingBuffer (void) | |
Constructor. More... | |
virtual | ~RingBuffer (void) |
Destructor not virtual. More... | |
void | push (const ValueType &newValue) |
Add a value to the buffer (overwrite oldest if full) More... | |
const ValueType & | top (void) const |
The value on the top of the buffer. More... | |
const ValueType & | top (uint16_t offset) const |
The value on the top of the buffer. More... | |
ValueType & | top (void) |
The value on the top of the buffer. More... | |
ValueType & | top (uint16_t offset) |
The value on the top of the buffer. More... | |
ValueType | pop (void) |
The value on the top of the buffer. More... | |
const ValueType & | bottom (void) const |
Get the last recently added value. More... | |
const ValueType & | bottomAndClearAll (void) |
Get the last recently added value. More... | |
const ValueType & | bottom (uint16_t offset) const |
Get the last recently added value. More... | |
bool | isEmpty (void) const |
Checks if the buffer is empty. More... | |
bool | isFull (void) const |
Checks if the buffer is full. More... | |
uint16_t | getSizeUsed (void) const |
Get the number of items in the buffer. More... | |
This template class implements a FIFO ringbuffer.
ElementType | The types of the elements in the buffer. |
BufferSize | Size of the buffer. Hint: The maximal number of items is one smaller than this value. |
typedef ElementType imt::base::core::util::RingBuffer< ElementType, BufferSize >::ValueType |
The type of the values/elements in this buffer.
enum imt::base::core::util::RingBuffer::Constants |
|
inline |
Constructor.
|
inlinevirtual |
Destructor not virtual.
|
inline |
Get the last recently added value.
The value will not be removed.
offset | The offset from the last inserted value. offset = 0: The same as bottom() -> The last inserted value. |
|
inline |
Get the last recently added value.
The value will not be removed.
|
inline |
Get the last recently added value.
All values will be removed.
|
inline |
Get the number of items in the buffer.
|
inline |
Checks if the buffer is empty.
|
inline |
Checks if the buffer is full.
|
inline |
The value on the top of the buffer.
The value will be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.
|
inline |
Add a value to the buffer (overwrite oldest if full)
newValue | The value to be added |
|
inline |
The value on the top of the buffer.
The value will not be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.
offset | The offset from the value on the top of the buffer. offset = 0: The same as top() -> The last inserted value. |
|
inline |
The value on the top of the buffer.
The value will not be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.
offset | The offset from the value on the top of the buffer. offset = 0: The same as top() -> The last inserted value. |
|
inline |
The value on the top of the buffer.
The value will not be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.
|
inline |
The value on the top of the buffer.
The value will not be removed from the buffer. There is no check if the value is valid. To check this use isEmpty.