Provides generic storage for data in an array and manipulation operations on that data. More...
#include <xsarray.h>
Related Functions | |
(Note that these are not member functions.) | |
void | XsArray_append (void *thisPtr, void const *other) |
Appends the other list to thisArray list. More... | |
void | XsArray_assign (void *thisPtr, XsSize count, void const *src) |
Reinitializes the XsArray with space for count items and copies them from src. More... | |
void const * | XsArray_at (void const *thisPtr, XsSize index) |
Returns a pointer to the item at the supplied index or a null pointer if it is out of bounds. More... | |
void * | XsArray_atIndex (void *thisPtr, XsSize index) |
Returns a pointer to the item at the supplied index or a null pointer if it is out of bounds. More... | |
int | XsArray_compare (void const *a, void const *b) |
Returns non-zero if the lists are different, 0 if they're equal. More... | |
int | XsArray_comparePredicate (void const *a, void const *b, XsArrayItemCompareFunc predicate) |
Returns non-zero if the lists are different, 0 if they're equal. More... | |
int | XsArray_compareSet (void const *a, void const *b) |
Returns -1 if a is smaller in some way than b, 1 if it is larger in some way and 0 if both lists are equal. More... | |
void | XsArray_construct (void *thisPtr, XsArrayDescriptor const *const descriptor, XsSize count, void const *src) |
Initializes the XsArray with space for count items and copies them from src. More... | |
void | XsArray_copy (void *thisPtr, void const *src) |
Copy the contents of src to thisArray. More... | |
void | XsArray_copyConstruct (void *thisPtr, void const *src) |
Initializes the XsArray with a copy of src. More... | |
void | XsArray_destruct (void *thisPtr) |
Clears and frees memory allocated by the XsArray. More... | |
int | XsArray_empty (void const *thisPtr) |
Returns whether the array is empty. More... | |
void | XsArray_erase (void *thisPtr, XsSize index, XsSize count) |
Removes a count items from the list starting at index. More... | |
ptrdiff_t | XsArray_find (void const *thisPtr, void const *needle) |
Returns the index of needle in the list or -1 if it wasn't found. More... | |
ptrdiff_t | XsArray_findPredicate (void const *thisPtr, void const *needle, XsArrayItemCompareFunc predicate) |
Returns the index of needle in the list or -1 if it wasn't found. More... | |
void | XsArray_insert (void *thisPtr, XsSize index, XsSize count, void const *src) |
Insert count items from src at index in the array. More... | |
void | XsArray_rawCopy (void *to, void const *from, XsSize count, XsSize iSize) |
Copies items optimized in a direct way. More... | |
void | XsArray_removeDuplicates (void *thisPtr) |
Removes duplicate entries from the array, keeping only the first instance of each value. More... | |
void | XsArray_removeDuplicatesPredicate (void *thisPtr, XsArrayItemCompareFunc predicate) |
Removes duplicate entries from the array, keeping only the first instance of each value. More... | |
void | XsArray_reserve (void *thisPtr, XsSize count) |
Reserves space for count items. More... | |
void | XsArray_resize (void *thisPtr, XsSize count) |
Resizes the existing list to count items. More... | |
void | XsArray_reverse (void *thisPtr) |
Reverses the contents of the array by repeatedly using the itemSwap func in the XsArrayDescriptor. More... | |
void | XsArray_sort (void *thisPtr) |
Sorts the array using the itemCompare func in the XsArrayDescriptor. More... | |
void | XsArray_swap (void *a, void *b) |
Swap the contents of a with those of b. More... | |
Provides generic storage for data in an array and manipulation operations on that data.