Tou
Tou header library
Loading...
Searching...
No Matches
Queue

Typedefs

typedef tou_llist_t tou_queue
 Make a queue alias for convenience.
 

Functions

tou_llist_ttou_queue_new ()
 Creates a new queue object.
 
void tou_queue_destroy (tou_llist_t *queue)
 Destroys existing queue object.
 
size_t tou_queue_len (tou_llist_t *queue)
 Returns the length of the queue.
 
void tou_queue_push (tou_llist_t **queue, void *elem)
 Pushes a new element to the top of the Queue.
 
void * tou_queue_pop (tou_llist_t **queue)
 Pops an element from the top of the Queue.
 

Detailed Description

Function Documentation

◆ tou_queue_destroy()

void tou_queue_destroy ( tou_llist_t * queue)

Destroys existing queue object.

Parameters
[in]queueObject to destroy

◆ tou_queue_len()

size_t tou_queue_len ( tou_llist_t * queue)

Returns the length of the queue.

Parameters
[in]queueQueue object
Returns
Queue length

◆ tou_queue_new()

tou_llist_t * tou_queue_new ( )

Creates a new queue object.

Returns
Queue object

◆ tou_queue_pop()

void * tou_queue_pop ( tou_llist_t ** queue)

Pops an element from the top of the Queue.

Parameters
[in]queuePointer to the queue object
Returns
Element

◆ tou_queue_push()

void tou_queue_push ( tou_llist_t ** queue,
void * elem )

Pushes a new element to the top of the Queue.

Parameters
[in]queueQueue object
[in]elemElement to push