template<class T> class OEBoundedBuffer
First-in-first-out (FIFO) queue that only allows for maxsize items to be stored in the buffer, hence, “bounded”. It is not inherently thread safe by itself. Use this in conjunction with a OEProtectedBuffer to make a thread-safe queue.
Determines the maximum number of elements this queue can hold. The maxsize parameter should be a power-of-2 to allow for a more efficient implementation.
bool Empty() const
Returns whether the queue contains any items.
bool Full() const
Returns true if the queue contains maxsize items.
Pops the next item off of the queue.
Returns the item that will be returned by the next call to OEBoundedBuffer.Get, but does not remove it from the queue.
void Put(T obj)
Pushes an item into the queue.
oesize_t Size() const
Returns the current number of items in the queue.