Attention

This functionality is only available in the C++ toolkits. For other languages, we recommend using language-specific functionality instead.

OEUnboundedBuffer

template<class T>
class OEUnboundedBuffer

First-in-first-out (FIFO) queue that only allows for any number of items to be stored in the buffer, hence, “unbounded”. It is not inherently thread safe by itself. Use this in conjunction with a OEProtectedBuffer to make a thread-safe queue.

Constructors

OEUnboundedBuffer(oesize_t)

The constructor argument is unused and reserved for future use. It is only there to comply with the OEBoundedBuffer constructor interface.

Empty

bool Empty() const

Returns whether the queue contains any items.

Full

bool Full() const

Returns true if the queue contains maxsize items.

Get

T Get()

Pops the next item off of the queue.

Peek

T Peek()

Returns the item that will be returned by the next call to OEBoundedBuffer.Get, but does not remove it from the queue.

Put

void Put(T obj)

Pushes an item into the queue.

Size

oesize_t Size() const

Returns the current number of items in the queue.