![]() |
Scanframe Modular Application 0.1.0
|
Fifo template for classes and structure pointers. More...
#include <TFifoClass.h>
Public Types | |
| typedef int | size_type |
Public Member Functions | |
| TFifoClass () | |
| Default constructor which needs Set() to validate object. | |
| TFifoClass (size_type size) | |
| Constructor that will setup the object immediately. | |
| ~TFifoClass () | |
| Destructor. | |
| bool | push (const T &item) |
| Pushes item into buffer. | |
| bool | push () |
| Push item of zero in fifo. | |
| bool | push (const T *item, size_type count) |
| Pushes multiple items if possible else it returns '0' and no items are inserted at all. | |
| const T & | peek () const |
| Returns next item without removing it. | |
| const T & | latest () const |
| Gives latest item pushed into the fifo. | |
| T | pop () |
| Read item at head of buffer and removes it. | |
| bool | pop (T &item) |
| Same as pop(void) but returns 'false' when the buffer is empty. | |
| bool | empty () const |
| Returns if current contained buffer data size is zero. | |
| size_type | size () const |
| Returns current buffer contained data size. | |
| size_type | sizeMax () const |
| Returns maximum containable size. | |
| size_type | sizeRemain () const |
| Returns remaining available size. | |
| bool | isValid () const |
| Returns 1 if object is valid else 0. | |
| bool | isFull () const |
| Returns '1' if object is full else 0. | |
| void | clear () |
| Resets instance to the initial state. | |
| bool | set (size_type size) |
| InitializeBase object after default construction or to increase size. | |
| T & | operator[] (size_type pos) |
| Array operator offset from head of buffer. | |
| const T & | operator[] (size_type pos) const |
| Const array operator offset from head of buffer. | |
| size_type | getTail () const |
| Access function for private member. | |
| size_type | getHead () const |
| Access function for private member. | |
| const T * | getBuffer (size_type pos=0) const |
| Access function for private member. | |
Fifo template for classes and structure pointers.
Provides an array operator to iterate through the fifo. Allows peeking for the next without popping the item.
| typedef int sf::TFifoClass< T >::size_type |
Type used for size and position.
|
inline |
Default constructor which needs Set() to validate object.
|
inlineexplicit |
Constructor that will setup the object immediately.
| sf::TFifoClass< T >::~TFifoClass | ( | ) |
Destructor.
|
inline |
Resets instance to the initial state.
| bool sf::TFifoClass< T >::empty | ( | ) | const |
Returns if current contained buffer data size is zero.
| const T * sf::TFifoClass< T >::getBuffer | ( | size_type | pos = 0 | ) | const |
Access function for private member.
| size_type sf::TFifoClass< T >::getHead | ( | ) | const |
Access function for private member.
| size_type sf::TFifoClass< T >::getTail | ( | ) | const |
Access function for private member.
|
inline |
Returns '1' if object is full else 0.
|
inline |
Returns 1 if object is valid else 0.
| const T & sf::TFifoClass< T >::latest | ( | ) | const |
Gives latest item pushed into the fifo.
| T & sf::TFifoClass< T >::operator[] | ( | size_type | pos | ) |
Array operator offset from head of buffer.
| const T & sf::TFifoClass< T >::operator[] | ( | size_type | pos | ) | const |
Const array operator offset from head of buffer.
| const T & sf::TFifoClass< T >::peek | ( | ) | const |
Returns next item without removing it.
| T sf::TFifoClass< T >::pop | ( | ) |
Read item at head of buffer and removes it.
| bool sf::TFifoClass< T >::pop | ( | T & | item | ) |
Same as pop(void) but returns 'false' when the buffer is empty.
| bool sf::TFifoClass< T >::push | ( | ) |
Push item of zero in fifo.
| bool sf::TFifoClass< T >::push | ( | const T & | item | ) |
Pushes item into buffer.
| item | Item pushed. |
| bool sf::TFifoClass< T >::push | ( | const T * | item, |
| size_type | count | ||
| ) |
Pushes multiple items if possible else it returns '0' and no items are inserted at all.
| bool sf::TFifoClass< T >::set | ( | size_type | size | ) |
InitializeBase object after default construction or to increase size.
| size_type sf::TFifoClass< T >::size | ( | ) | const |
Returns current buffer contained data size.
|
inline |
Returns maximum containable size.
|
inline |
Returns remaining available size.