#include <UT_RingBuffer.h>
Public Member Functions | |
| UT_RingBuffer () | |
| UT_RingBuffer (int capacity) | |
| ~UT_RingBuffer () | |
| void | insert (int id, utPtr data) |
| void | remove (int id) |
| utPtr | popFirst () |
| int | push (utPtr data) |
| void | pop () |
| Pop a single element from the start of the buffer. | |
| void | pop (int number) |
| Pop the next "number" elements from the buffer. | |
| int | entries () const |
| int | peakUsage () const |
| utPtr | operator[] (int id) const |
| utPtr | operator() (int id) const |
| utPtr | front () const |
| int | frontId () const |
| utPtr | back () const |
| int | backId () const |
| void | display () const |
Definition at line 30 of file UT_RingBuffer.h.
| UT_RingBuffer< utPtr >::UT_RingBuffer | ( | ) | [inline] |
Definition at line 32 of file UT_RingBuffer.h.
| UT_RingBuffer< utPtr >::UT_RingBuffer | ( | int | capacity | ) | [inline] |
Definition at line 33 of file UT_RingBuffer.h.
| UT_RingBuffer< utPtr >::~UT_RingBuffer | ( | ) | [inline] |
Definition at line 34 of file UT_RingBuffer.h.
| utPtr UT_RingBuffer< utPtr >::back | ( | ) | const [inline] |
Definition at line 76 of file UT_RingBuffer.h.
| int UT_RingBuffer< utPtr >::backId | ( | ) | const [inline] |
Definition at line 77 of file UT_RingBuffer.h.
| void UT_RingBuffer< utPtr >::display | ( | ) | const [inline] |
Definition at line 79 of file UT_RingBuffer.h.
| int UT_RingBuffer< utPtr >::entries | ( | void | ) | const [inline] |
Definition at line 61 of file UT_RingBuffer.h.
| utPtr UT_RingBuffer< utPtr >::front | ( | ) | const [inline] |
In order to iterate over the contents of the ring buffer for (i = rbuf.frontId(); i <= rbuf.backId(); i++) element = rbuf(i); The backId is *inclusive*!!! There shouldn't be holes in the array.
Definition at line 74 of file UT_RingBuffer.h.
| int UT_RingBuffer< utPtr >::frontId | ( | ) | const [inline] |
Definition at line 75 of file UT_RingBuffer.h.
| void UT_RingBuffer< utPtr >::insert | ( | int | id, | |
| utPtr | data | |||
| ) | [inline] |
Null-padded insertion. If the id of the incoming object is greater than the next order number that would be assigned by push(), holes are created in the buffer.
Definition at line 39 of file UT_RingBuffer.h.
| utPtr UT_RingBuffer< utPtr >::operator() | ( | int | id | ) | const [inline] |
Definition at line 67 of file UT_RingBuffer.h.
| utPtr UT_RingBuffer< utPtr >::operator[] | ( | int | id | ) | const [inline] |
operator [] is the bounds checked version of the operator. The id is the order number of the object being indexed.
Definition at line 66 of file UT_RingBuffer.h.
| int UT_RingBuffer< utPtr >::peakUsage | ( | ) | const [inline] |
Definition at line 62 of file UT_RingBuffer.h.
| void UT_RingBuffer< utPtr >::pop | ( | int | number | ) | [inline] |
| void UT_RingBuffer< utPtr >::pop | ( | ) | [inline] |
| utPtr UT_RingBuffer< utPtr >::popFirst | ( | ) | [inline] |
Pop the first element off the head of the list, moving the first entry to the next element.
Definition at line 44 of file UT_RingBuffer.h.
| int UT_RingBuffer< utPtr >::push | ( | utPtr | data | ) | [inline] |
Insert the data into the buffer, and return the order number that it is assigned.
Definition at line 53 of file UT_RingBuffer.h.
| void UT_RingBuffer< utPtr >::remove | ( | int | id | ) | [inline] |
Definition at line 40 of file UT_RingBuffer.h.
1.5.9