reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
deque.h
Go to the documentation of this file.
1
59#ifndef DEQUE_H
60#define DEQUE_H
61
62#include <stddef.h> // Defines size_t
63#include <stdbool.h> // Defines bool
64#include <stdlib.h> // Defines malloc and free
65
69typedef struct deque_t {
72 size_t size;
74
80
85bool deque_is_empty(deque_t* d);
86
92size_t deque_size(deque_t* d);
93
99void deque_push_front(deque_t* d, void* value);
100
106void deque_push_back(deque_t* d, void* value);
107
113void* deque_pop_front(deque_t* d);
114
120void* deque_pop_back(deque_t* d);
121
127void* deque_peek_back(deque_t* d);
128
134void* deque_peek_front(deque_t* d);
135
136#endif // DEQUE_H
void deque_initialize(deque_t *d)
Definition deque.c:75
void deque_push_front(deque_t *d, void *value)
Definition deque.c:119
void * deque_peek_back(deque_t *d)
Definition deque.c:202
void * deque_pop_front(deque_t *d)
Definition deque.c:155
void * deque_peek_front(deque_t *d)
Definition deque.c:214
void * deque_pop_back(deque_t *d)
Definition deque.c:179
void deque_push_back(deque_t *d, void *value)
Definition deque.c:137
bool deque_is_empty(deque_t *d)
Definition deque.c:87
size_t deque_size(deque_t *d)
Definition deque.c:99
struct deque_t deque_t
Definition deque.c:65
void * value
Definition deque.c:68
Definition deque.h:69
struct deque_node_t * back
Definition deque.h:71
size_t size
Definition deque.h:72
struct deque_node_t * front
Definition deque.h:70