ocean.util.container.queue.model.ITypedQueue

An interface for a FIFO queue with items of a specific type.

This interface is deliberately designed to be as minimal as possible, only covering the core functionality shared by the wide variety of possible queue implementations. For example, even a basic pop function which returns an item is not generic -- certain implementations may need to relinquish the item after popping it, making a simple pop-then-return implementation impossible. For this reason, some additional helper functions are provided, which may be useful with some queue implementations.

Members

Functions

pop
bool pop(ITypedQueue!(T) q, T t)

A helper function to pop an item from ITypedQueue.

push
bool push(ITypedQueue!(T) q, T t)

A helper function to push an item into ITypedQueue.

testInterfaceMethods
void testInterfaceMethods(ITypedQueue!(T) queue, T[] items)

Test the methods defined in the ITypedQueue interface

Interfaces

ITypedQueue
interface ITypedQueue(T)

An interface for a FIFO queue with items of a specific type.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).