Queue

A simple queue wrapper around a dynamic array.

Constructors

this
this()

Creates a new queue.

Members

Functions

dequeue
T dequeue()

Retrieves and removes the front item from the queue. Use has() before calling this.

enqueue
void enqueue(T item)

Enqueues an item.

has
bool has()

Checks whether the queue has any items or not.

peek
T peek()

Peeks within the queue for the current front item. Use has() before calling this.

Properties

length
size_t length [@property getter]

Gets the length of the queue.

Meta