Data Fields | |
void * | first_element |
Pointer to the first element of the array. | |
int | array_size |
Size of the array (maximum number of elements). | |
int | number_of_elements |
Current number of elements in the array. | |
int(* | copy_data )(void *src, void *dest) |
User defined function used to copy data from/to the array. | |
int(* | remove_data )(void *target) |
User defined function used to remove an element from the array (it may be necessary to free memory for example). | |
int(* | compare )(void *d1, void *d2) |
User defined function used to compare two elements of the array. | |
void *(* | index )(void *start, int idx) |
User defined function that returns a pointer to the element which index is idx. | |
int(* | init_data )(void *data) |
User defined function used to initialize data (may be a NULL pointer if no initialization is required). | |
int | element_to_remove |
Number of elements scheduled for removing. | |
int * | to_remove |
Pointer to an array of integers that will receive the index to remove from the array. This array is allocated during the initialization of the array. You must free the memory using the function array_free(). |
Definition at line 10 of file array.h.
|
User defined function used to compare two elements of the array.
Referenced by array_find(), and array_init(). |
|
User defined function used to copy data from/to the array.
Referenced by array_add(), array_init(), array_insert(), and array_rem(). |
|
User defined function that returns a pointer to the element which index is idx.
Referenced by array_add(), array_find(), array_init(), array_init_element(), array_insert(), and array_rem(). |
|
User defined function used to initialize data (may be a NULL pointer if no initialization is required).
Referenced by array_init(), and array_init_element(). |
|
User defined function used to remove an element from the array (it may be necessary to free memory for example).
Referenced by array_init(), and array_rem(). |