|
void * | deque_first (const deque_t *self) |
| The current first element in the queue.
|
void * | deque_last (const deque_t *self) |
| The current last element in the queue.
|
void * | deque_get (const deque_t *self, size_t index) |
| The element of the element at an arbitrary index.
|
bool | deque_is_empty (const deque_t *self) |
| True if no elements are currently stored.
|
bool | deque_is_full (const deque_t *self) |
| True if the queue reached its maximum capacity.
|
size_t | deque_count (const deque_t *self) |
| The number of elements currently held in the queue.
|
size_t | deque_capacity (const deque_t *self) |
| The maximum number of elements that can be stored.
|
size_t | deque_room (const deque_t *self) |
| The remaining number of elements that can be added.
|
void | deque_reserve (deque_t *self, size_t count) |
| Reallocates the deque if count elements cannot fit in the current allocation.
|
bool | deque_push_front (deque_t *self, const void *element) |
| Inserts an element to the front of the queue.
|
bool | deque_push_front_n (deque_t *self, const void *elements, size_t count) |
| Inserts count elements to the front of the queue.
|
bool | deque_push_back (deque_t *self, const void *element) |
| Inserts an element to the back of the queue.
|
bool | deque_push_back_n (deque_t *self, const void *elements, size_t count) |
| Inserts count elements to the back of the queue.
|
bool | deque_pop_front (deque_t *self, void *destination) |
| Pops the front-most element of the queue, copying it to destination.
|
bool | deque_pop_front_n (deque_t *self, void *destination, size_t count) |
| Pops the count first elements of the queue.
|
bool | deque_pop_back (deque_t *self, void *destination) |
| Pops the last element in the queue.
|
bool | deque_pop_back_n (deque_t *self, void *destination, size_t count) |
| Pops the count last elements in the queue.
|
bool | deque_pop_front_into_array (deque_t *self, struct array *destination, size_t count) |
| Move the count first elements at the back of destination .
|
Realtime double-ended queues.
- Copyright
- 2023, SAFRAN T4DS, ALL RIGHTS RESERVED
- Author
- Hugo FOLCHER
-
Antoine GAGNIERE
Definition in file deque.h.
Automatically free the alloacted storage when going out of scope.
In a situation where one wants to declare a Deque in a local scope, this "typedef" can be used for that Deque to release the allocated memory automatically when the variable goes out of scope.
It means this "typedef" can only be used like this:
{
...
}
#define DequeAllocate(Capacity, Type)
Wrapper around the owning constructor.
#define Deque
Automatically free the alloacted storage when going out of scope.
Definition at line 71 of file deque.h.