- template <typename Item>
A templated Queue, where template defines the queue element type.
This class is identical to Queue, but it uses templating to preserve type information.
This is a basic single linked FIFO queue structure. All items in the queue must implement the QueueItem interface.
Item data types
Items added to the queue must inherit from the interface QueueItem. This is required because this interface defined the queues next pointer.
Should you try to construct a GenericQueue with non-QueueItem based template, you will get a compiler warning.
As with standard queue data types, enqueueing and dequeueing items are constant time ( O(1) ). However removing an element inside the queue is linear ( O(n) ), same for getting the current length or size of the queue.