Simple Array
[Utilities]
Detailed Description
- Expandable array using a simple pointer.
- See iup_array.h
Functions | |
Iarray * | iupArrayCreate (int start_count, int elem_size) |
void | iupArrayDestroy (Iarray *array) |
void * | iupArrayGetData (Iarray *array) |
void * | iupArrayInc (Iarray *array) |
void * | iupArrayAdd (Iarray *array, int new_count) |
int | iupArrayCount (Iarray *array) |
Function Documentation
|
Creates an array with an initial room for elements, and the element size. The array count starts at 0. And the maximum number of elements starts at the given count. The maximum number of elements is increased by the start count, every time it needs more memory. Must call iupArrayInc to proper allocates memory. |
|
Destroys the array. |
|
Returns the pointer that contains the array. |
|
Increments the number of elements in the array. The array count starts at 0. If the maximum number of elements is reached, the memory allocated is increased by the initial start count. Returns the pointer that contains the array. |
|
Increments the number of elements in the array by a given count. The array count starts at 0. If the maximum number of elements is reached, the memory allocated is increased by the given count. Returns the pointer that contains the array. |
|
Returns the actual number of elements in the array. |