afc_array_master_add

Name

afc_array_master_add  -- Adds a new element to the array

Synopsis

int afc_array_master_add ( ArrayMaster * array_master, void * data, int mode );

Description

This function adds a new element to the array. If the array is full and you are trying a new element that is after the (internal) size limit of the array, the array will double its size (without loosing any data) and the element will be added.

Inputs

array_master

Pointer to a valid afc_array_master instance.

data

Data to add to the array.

mode

Inserting method. Valid values are:

AFC_ARRAY_MASTER_ADD_TAIL

This is the fastest method of all. Element will be added as the last element in the array.

AFC_ARRAY_MASTER_ADD_HEAD

This is the slowest method of all. Element will be added as the first element of the array.

AFC_ARRAY_MASTER_ADD_HERE

This method is quite slow (depending on the current position in the array). It will add the data after the current array position.

Result

See Also