Data Structures | |
struct | Queue |
struct | Queue |
Functions | |
Queue * | queue_create (void) |
Create a new queue. | |
void | queue_destroy (Queue *q) |
Destroy a queue. | |
void | queue_add (Queue *q, void *item) |
Add an element to a queue. | |
void * | queue_remove (Queue *q) |
Remove an element from a queue. | |
void | queue_remove_all (Queue *q, void *item) |
Remove all instances of a given element from a queue. | |
int | queue_size (Queue *q) |
Get the size of a queue. | |
int | queue_is_empty (Queue *q) |
Check if the queue is empty. |
A queue implementation.
|
Add an element to a queue. Add an element to a queue.
|
|
Create a new queue. Create a queue.
|
|
Destroy a queue. Destroys a queue, freeing memory.
|
|
Check if the queue is empty. Check if the queue is empty.
|
|
Remove an element from a queue. Remove an element from the front of a queue.
|
|
Remove all instances of a given element from a queue. Remove all instances of a given element from a queue.
|
|
Get the size of a queue. Get the number of elements in the queue.
|