55 #if !defined(__AMXC_AQUEUE_H__)
56 #define __AMXC_AQUEUE_H__
Ambiorix array API header file.
AMXC_INLINE void amxc_aqueue_delete(amxc_aqueue_t **aqueue, amxc_aqueue_it_delete_t func)
Frees the previously allocated array queue.
AMXC_INLINE size_t amxc_aqueue_is_empty(const amxc_aqueue_t *const aqueue)
Checks that the array queue is empty.
amxc_array_it_delete_t amxc_aqueue_it_delete_t
Definition of the item delete function.
AMXC_INLINE size_t amxc_aqueue_size(const amxc_aqueue_t *const aqueue)
Calculates the number of items in the queue.
AMXC_INLINE amxc_aqueue_it_t * amxc_aqueue_add(amxc_aqueue_t *const aqueue, void *data)
Adds data to the array queue.
AMXC_INLINE void amxc_aqueue_clean(amxc_aqueue_t *const aqueue, amxc_aqueue_it_delete_t func)
Removes all items from the array queue.
AMXC_INLINE void * amxc_aqueue_remove(amxc_aqueue_t *const aqueue)
Removes the first added data from the queue.
amxc_array_it_t amxc_aqueue_it_t
The array queue iterator structure.
AMXC_INLINE int amxc_aqueue_init(amxc_aqueue_t *const aqueue)
Initializes an array queue.
amxc_array_t amxc_aqueue_t
The array queue structure.
AMXC_INLINE int amxc_aqueue_new(amxc_aqueue_t **aqueue)
Allocates an array queue.
void * amxc_array_take_first_data(amxc_array_t *const array)
Takes the data pointer from the first used item in the array.
size_t amxc_array_size(const amxc_array_t *const array)
Calculates the number of used items in the array.
int amxc_array_shift_left(amxc_array_t *const array, const size_t items, amxc_array_it_delete_t func)
Shift all items to the left in the array.
int amxc_array_init(amxc_array_t *const array, const size_t items)
Initializes an array.
bool amxc_array_is_empty(const amxc_array_t *const array)
Checks that the array is empty.
int8_t amxc_array_new(amxc_array_t **array, const size_t items)
Allocates an array.
void amxc_array_clean(amxc_array_t *const array, amxc_array_it_delete_t func)
Removes all items from the array.
void(* amxc_array_it_delete_t)(amxc_array_it_t *it)
Definition of the array item delete callback function.
amxc_array_it_t * amxc_array_append_data(amxc_array_t *const array, void *data)
Adds an item after the last used item in the array.
void amxc_array_delete(amxc_array_t **array, const amxc_array_it_delete_t func)
Frees the previously allocated array.
The array iterator structure.