t_queue * queue_new(const t_type *type)
Allocates memory and initializes an empty queue.
void * queue_peek(const t_queue *queue)
Returns the item in this queue that was least recently added.
Doubly-linked list of generic items.
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
void queue_delete(t_queue *queue)
Deletes the queue and frees all memory taken by its contents, or does nothing if the argument is NULL...
size_t queue_size(const t_queue *queue)
Returns the number of items in this queue.
void queue_enqueue(t_queue *queue, const void *data)
Copies the item and adds the copy to the queue.
const t_type * type
The type of items in this list.
t_queue * queue_copy(const t_queue *queue)
Copies a queue and all it contents.
void * queue_dequeue(t_queue *queue)
Removes and returns the item on this queue that was least recently added.