UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
queue.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Node
 Node data structure contains data and next node pointer. More...
 
struct  Queue
 Queue data structure. More...
 

Functions

void initQueue (struct Queue *queue)
 Initialize queue structure with NULL value. More...
 
int isEmpty (struct Queue *queue)
 Check if queue structure is empty. More...
 
void enqueue (struct Queue *queue, int data)
 Allocate new node and add to queue structure. More...
 
int dequeue (struct Queue *queue)
 Take out the first added element. More...
 

Function Documentation

◆ dequeue()

int dequeue ( struct Queue queue)

Take out the first added element.

Parameters
queueQueue data structure to take element out
[out]popdataValue of poped data

Definition at line 77 of file queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueue()

void enqueue ( struct Queue queue,
int  data 
)

Allocate new node and add to queue structure.

Parameters
queueQueue data structure to add new node
dataValue to add

Definition at line 55 of file queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initQueue()

void initQueue ( struct Queue queue)

Initialize queue structure with NULL value.

Parameters
queueQueue data structure to initialize

Definition at line 30 of file queue.c.

Here is the caller graph for this function:

◆ isEmpty()

int isEmpty ( struct Queue queue)

Check if queue structure is empty.

Parameters
queueQueue data structure to check

Definition at line 41 of file queue.c.

Here is the caller graph for this function: