This module contains enums, functions, and structures related to sld_queue objects.
A sld_queue contains data in a FIFO (first in, first out) arrangement
These constants allow the user to define how queue data should reside in memory (contiguous or not.) This can also affect performance (resizing arrays can be expensive in the case of a vector for example.)
Enumerator |
---|
sld_queue_list |
|
sld_queue_vector |
|
Adds an object to the start of a sld_queue.
- Parameters
-
queue | an initialized sld_queue |
object | an arbitrary object |
- Returns
- Success or failure
- Examples:
- queue.c.
void sld_queue_free |
( |
struct sld_queue * |
queue | ) |
|
|
related |
Frees any memory allocated for an initialized sld_queue.
- Parameters
-
- Examples:
- queue.c.
Initializes a sld_queue.
- Parameters
-
queue | an uninitialized sld_queue |
queue_type | can be either a sld_queue_list or sld_queue_vector |
- Returns
- Success or failure
- Examples:
- queue.c.
void * sld_queue_peek |
( |
struct sld_queue * |
queue | ) |
|
|
related |
void * sld_queue_remove |
( |
struct sld_queue * |
queue | ) |
|
|
related |
Returns and removes the first object in a sld_queue.
- Parameters
-
- Returns
- The first object in the passed sld_queue
- Examples:
- queue.c.