|
EasyConsole
|
A simple circular buffer. More...
Public Member Functions | |
| CircularBuffer (int maxCapacity, bool overwrite) | |
| Constructs a CircularBuffer with a defined maximum capacity. | |
| void | Enqueue (T item) |
| adds an item to the end of the buffer | |
| T | Dequeue () |
| removes and return the first item on the buffer | |
| int | Count () |
| Returns the current amount of items stored in the buffer. | |
| T | GetItemAt (int index) |
| Returns the item at the given index. | |
| IEnumerator< T > | GetEnumerator () |
| Returns an enumerator for an enumerator loop. | |
A simple circular buffer.
| T | The type to store in the buffer |
| Homans.Containers.CircularBuffer< T >.CircularBuffer | ( | int | maxCapacity, |
| bool | overwrite | ||
| ) |
Constructs a CircularBuffer with a defined maximum capacity.
| maxCapacity | The maximum capacity |
| overwrite | Overwrite old values if capacity is reached? |
| int Homans.Containers.CircularBuffer< T >.Count | ( | ) |
Returns the current amount of items stored in the buffer.
| T Homans.Containers.CircularBuffer< T >.Dequeue | ( | ) |
removes and return the first item on the buffer
| void Homans.Containers.CircularBuffer< T >.Enqueue | ( | T | item | ) |
adds an item to the end of the buffer
| item | The item to push |
| IEnumerator<T> Homans.Containers.CircularBuffer< T >.GetEnumerator | ( | ) |
Returns an enumerator for an enumerator loop.
| T Homans.Containers.CircularBuffer< T >.GetItemAt | ( | int | index | ) |
Returns the item at the given index.
| index | The item index |