Typedefs | |
| typedef _Queue | Queue |
| A double-ended queue. | |
Functions | |
| Queue * | queue_new (void) |
| Create a new double-ended queue. | |
| void | queue_free (Queue *queue) |
| Destroy a queue. | |
| void | queue_push_head (Queue *queue, void *data) |
| Add data to the head of a queue. | |
| void * | queue_pop_head (Queue *queue) |
| Remove data from the head of a queue. | |
| void * | queue_peek_head (Queue *queue) |
| Read data from the head of queue, without removing it from the queue. | |
| void | queue_push_tail (Queue *queue, void *data) |
| Add data to the tail of a queue. | |
| void * | queue_pop_tail (Queue *queue) |
| Remove data from the tail of a queue. | |
| void * | queue_peek_tail (Queue *queue) |
| Read data from the tail of queue, without removing it from the queue. | |
| int | queue_is_empty (Queue *queue) |
| Query if any data is currently in a queue. | |
A double ended queue stores a list of pointers in order. New data can be added and removed from either end of the queue.
To create a new queue, use queue_new. To destroy a queue, use queue_free.
To add data to a queue, use queue_push_head and queue_push_tail.
To read data from the ends of a queue, use queue_pop_head and queue_pop_tail. To examine the ends without removing data from the queue, use queue_peek_head and queue_peek_tail.
|
|
Destroy a queue.
|
|
|
Query if any data is currently in a queue.
|
|
|
Create a new double-ended queue.
|
|
|
Read data from the head of queue, without removing it from the queue.
|
|
|
Read data from the tail of queue, without removing it from the queue.
|
|
|
Remove data from the head of a queue.
|
|
|
Remove data from the tail of a queue.
|
|
||||||||||||
|
Add data to the head of a queue.
|
|
||||||||||||
|
Add data to the tail of a queue.
|
1.4.4