Collaboration diagram for Array Container:
|
Files | |
| file | psArray.h |
| Contains basic array definitions and operations. | |
Data Structures | |
| struct | psArray |
| An array to support primitive types. More... | |
Functions | |
| psArray * | psArrayAlloc (psU32 nalloc) |
| Allocate an array. | |
| psArray * | psArrayRealloc (psArray *psArr, psU32 nalloc) |
| Reallocate an array. | |
| psArray * | psArrayAdd (psArray *psArr, int delta, psPtr data) |
| Add an element to the end the array, expanding the array storage if necessary. | |
| psBool | psArrayRemove (psArray *psArr, psPtr data) |
| Remove an element from the array. | |
| void | psArrayElementFree (psArray *psArr) |
| Deallocate/Dereference elements of an array. | |
| psArray * | psArraySort (psArray *in, psComparePtrFcn compare) |
| Sort the array according to an external compare function. | |
| psBool | psArraySet (psArray *in, psU32 position, void *value) |
| Set an element in the array. | |
| void * | psArrayGet (psArray *in, psU32 position) |
| Get an element from the array. | |
|
||||||||||||||||
|
Add an element to the end the array, expanding the array storage if necessary.
|
|
|
Allocate an array. Uses psLib memory allocation functions to create an array collection of data
|
|
|
Deallocate/Dereference elements of an array. Uses psLib memory allocation functions to deallocate/dereference elements of a array of void pointers. The array psArr is not freed, and its elements will all be set to NULL.
|
|
||||||||||||
|
Get an element from the array.
|
|
||||||||||||
|
Reallocate an array. Uses psLib memory allocation functions to reallocate an array collection of data.
|
|
||||||||||||
|
Remove an element from the array. Finds and removes the specified data pointer from the list.
|
|
||||||||||||||||
|
Set an element in the array. If the current element is non-NULL, the old element is freed.
|
|
||||||||||||
|
Sort the array according to an external compare function. Sorts an array via the specification of a comparison function to specify how the objects on the array should be sorted. The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. If two members compare as equal, their order in the sorted array is undefined.
|
1.4.1