C_Algorithms 2.0.0
Documentation
|
Go to the source code of this file.
Functions | |
myqueue_t * | CreateQueue (uint32_t capacity) |
Create a Queue object. | |
myqueue_t * | FreeQueue (myqueue_t *queue) |
Delete Queue object. | |
bool | QueueIsEmpty (myqueue_t *queue) |
Check if Queue is empty. | |
bool | QueueIsFull (myqueue_t *queue) |
Check if Queue is full. | |
void | PushQueue (myqueue_t *queue, queue_value_t value) |
Put new data in the Queue object. | |
queue_value_t | PopQueue (myqueue_t *queue) |
Delete data from Queue object. | |
queue_value_t | FrontQueue (myqueue_t *queue) |
First value of the Queue. | |
queue_value_t | BackQueue (myqueue_t *queue) |
Last element of the Queue. | |
void | PrintQueue (myqueue_t *queue) |
Print the whole queue. | |
void | Queue () |
queue_value_t BackQueue | ( | myqueue_t * | queue | ) |
Last element of the Queue.
queue |
Definition at line 133 of file queue.c.
References queue::back_id, queue::data, QUEUE_NO_VALUE, and QueueIsEmpty().
myqueue_t * CreateQueue | ( | uint32_t | capacity | ) |
Create a Queue object.
capacity |
Definition at line 13 of file queue.c.
References queue::back_id, queue::capacity, queue::data, queue::front_id, and queue::size.
Referenced by Queue().
Delete Queue object.
queue |
Definition at line 44 of file queue.c.
References queue::data.
Referenced by Queue().
queue_value_t FrontQueue | ( | myqueue_t * | queue | ) |
First value of the Queue.
queue |
Definition at line 120 of file queue.c.
References queue::data, queue::front_id, QUEUE_NO_VALUE, and QueueIsEmpty().
queue_value_t PopQueue | ( | myqueue_t * | queue | ) |
Delete data from Queue object.
queue |
Definition at line 103 of file queue.c.
References queue::capacity, queue::data, queue::front_id, QUEUE_NO_VALUE, QueueIsEmpty(), and queue::size.
void PrintQueue | ( | myqueue_t * | queue | ) |
Print the whole queue.
queue |
Definition at line 145 of file queue.c.
References queue::capacity, queue::data, and queue::size.
Referenced by Queue().
void PushQueue | ( | myqueue_t * | queue, |
queue_value_t | value ) |
Put new data in the Queue object.
queue | |
value |
Definition at line 87 of file queue.c.
References queue::back_id, queue::capacity, queue::data, QueueIsFull(), and queue::size.
Referenced by Queue().
void Queue | ( | ) |
Definition at line 163 of file queue.c.
References CreateQueue(), FreeQueue(), PrintQueue(), and PushQueue().
Referenced by FunctionCall().
bool QueueIsEmpty | ( | myqueue_t * | queue | ) |
Check if Queue is empty.
queue |
Definition at line 64 of file queue.c.
References queue::size.
Referenced by BackQueue(), FrontQueue(), and PopQueue().
bool QueueIsFull | ( | myqueue_t * | queue | ) |
Check if Queue is full.
queue |
Definition at line 76 of file queue.c.
References queue::capacity, and queue::size.
Referenced by PushQueue().