#include <Fifo.h>
Inheritance diagram for util::Fifo< T >:

When an element is put on a Fifo, the last element will "pop out". For performance reasons, Fifo is implemented as a circular buffer. For that reason, one might get unexpected results when using List's elementAt method or the [] operator.
Public Methods | |
| Fifo (int capacity, T initialValue=0) | |
| Create a new Fifo with the given capacity. | |
| Fifo (const Fifo &other) | |
| Copy a Fifo. | |
| Fifo (const List< T > &other) | |
| Copy a List. | |
| Fifo & | operator= (const Fifo &other) |
| Copy a Fifo. | |
| Fifo & | operator= (const List< T > &other) |
| Copy a List. | |
| T | put (T value) |
| Put a value into a fifo. | |
| void | addElement (const T &element) |
| Put a value into a fifo. | |
| T & | operator[] (int index) |
| Get the value at index. | |
| const T & | operator[] (int index) const |
| Get the value at index. | |
| T | getElementAt (int index) |
| T & | elementAt (int index) |
| const T & | elementAt (int index) const |
|
||||||||||||||||
|
Create a new Fifo with the given capacity. The contents of the Fifo will be filled with initialValue. |
|
||||||||||
|
Reimplemented from util::List< T >. |
|
||||||||||
|
Reimplemented from util::List< T >. |
|
||||||||||
|
|
|
||||||||||
|
Get the value at index. Const version. Reimplemented from util::List< T >. |
|
||||||||||
|
Get the value at index. Use this operator if you want to access the circularly indexed buffer so that index 0 always references the oldest item. Reimplemented from util::List< T >. |
|
||||||||||
|
Put a value into a fifo. This will pop out the last value. |