|
xsens_imu
|
A FIFO queue with limited length (cyclic). More...
#include <xsens_fifoqueue.h>
Public Types | |
| typedef T | value_type |
| The type of the value stored in this queue. More... | |
| typedef size_t | size_type |
| The type of a 'size' value. More... | |
Public Member Functions | |
| FifoQueue (size_type size=16, bool delOnOverwrite=true) | |
| Create an empty queue with capacity size. More... | |
| template<bool E2> | |
| FifoQueue (const FifoQueue< T, E2 > &q) | |
| The copy constructor. More... | |
| void | eraseAndClear (void) |
| ~FifoQueue () | |
| The destructor. More... | |
| template<bool E2> | |
| FifoQueue< T, E > & | operator= (const FifoQueue< T, E2 > &q) |
| The assignment operator. More... | |
| void | resize (const size_t size) |
| Resize the queue, note that this function clears the queue. More... | |
| bool | empty () const |
| Return true if the queue is empty. More... | |
| size_type | size () const |
| Return the maximum number of elements in the queue. More... | |
| size_type | length () const |
| Return the number of elements currnetly in the queue. More... | |
| value_type & | front () |
| Return the oldest element in the queue. More... | |
| const value_type & | front () const |
| Return the oldest element in the queue. More... | |
| value_type & | back () |
| Return the newest element in the queue. More... | |
| const value_type & | back () const |
| Return the newest element in the queue. More... | |
| void | push (const value_type &x) |
| Insert x at the back of the queue. More... | |
| void | pop (void) |
| Remove the element at the front of the queue. More... | |
| void | popBack (void) |
| Remove the element at the back of the queue. More... | |
| const value_type & | operator[] (size_t index) const |
| Return the index'th oldest item from the queue. More... | |
| value_type & | operator[] (size_t index) |
| Return the index'th oldest item from the queue. More... | |
| void | clear (void) |
| void | remove (size_t index) |
Protected Attributes | |
| size_t | m_maxCount |
| size_t | m_currentCount |
| size_t | m_first |
| bool | m_deleteOnOverwrite |
| T * | m_list |
A FIFO queue with limited length (cyclic).
The class is based on the STL queue class, but has a limited size. If more items are inserted than would fit, the oldest item is overwritten. The class can only handle pointer types.
| typedef size_t xsens::FifoQueue< T, E >::size_type |
The type of a 'size' value.
| typedef T xsens::FifoQueue< T, E >::value_type |
The type of the value stored in this queue.
|
inline |
Create an empty queue with capacity size.
|
inline |
The copy constructor.
|
inline |
The destructor.
|
inline |
Return the newest element in the queue.
|
inline |
Return the newest element in the queue.
|
inline |
|
inline |
Return true if the queue is empty.
|
inline |
|
inline |
Return the oldest element in the queue.
|
inline |
Return the oldest element in the queue.
|
inline |
Return the number of elements currnetly in the queue.
|
inline |
The assignment operator.
|
inline |
Return the index'th oldest item from the queue.
|
inline |
Return the index'th oldest item from the queue.
|
inline |
Remove the element at the front of the queue.
|
inline |
Remove the element at the back of the queue.
|
inline |
Insert x at the back of the queue.
|
inline |
|
inline |
Resize the queue, note that this function clears the queue.
|
inline |
Return the maximum number of elements in the queue.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.13