|
osurs
0.0.1
|
#include <stdbool.h>

Go to the source code of this file.
Data Structures | |
| struct | QueueNode |
| Queue node. More... | |
| struct | Queue |
| Queue. More... | |
Typedefs | |
| typedef struct QueueNode | QueueNode |
| Queue node. More... | |
| typedef struct Queue | Queue |
| Queue. More... | |
Functions | |
| void | queue_init (Queue *queue) |
| Initialize a Queue structure. More... | |
| Queue * | queue_create () |
| Create a new Queue structure. More... | |
| void | queue_enqueue (Queue *queue, void *data) |
| Add an element to the end of a Queue. More... | |
| void * | queue_dequeue (Queue *queue) |
| Remove an element from the front of a Queue. More... | |
| bool | queue_is_empty (Queue *queue) |
| Check if a Queue is empty. More... | |
| void | queue_clear (Queue *queue) |
| Clear all elements from a Queue. More... | |
| void | queue_free (Queue *queue) |
| Free a Queue structure. More... | |
Queue data structure.
This file defines a Queue data structure, which is an abstract data type (ADT) that implements a FIFO (first-in, first-out) queue. Elements can be inserted at one end (tail) and removed from the other end (head).
| void queue_clear | ( | Queue * | queue | ) |
| Queue* queue_create | ( | ) |
| void* queue_dequeue | ( | Queue * | queue | ) |
Remove an element from the front of a Queue.
This function removes the element at the front of a Queue and returns a pointer to it. If the queue is empty, the function returns NULL.
| queue | The Queue from which the element will be removed. |
| void queue_enqueue | ( | Queue * | queue, |
| void * | data | ||
| ) |
| void queue_free | ( | Queue * | queue | ) |
| void queue_init | ( | Queue * | queue | ) |