GATE
|
A linear changable field of pointers to changable items of the same types. More...
#include <arrays.h>
Data Fields | |
void ** | data_ptr |
gate_size_t | item_size |
gate_size_t | item_count |
gate_size_t | item_capacity |
gate_mem_copyctor_t | construct_item |
gate_mem_dtor_t | destruct_item |
A linear changable field of pointers to changable items of the same types.
A new item is copied into a separate memory space and a pointer to it is added to the slotlist array. Such pointer arrays are manipulated faster than arraylists as they only need to move pointers instead of copying whole objects, but they have a higher memory overhead. New added items are inserted in the next free position. If an item is removed at a specific position, the next added item takes that free position.
void** data_ptr |
pointer to first item in slot-list
gate_size_t item_size |
size of one item in bytes
gate_size_t item_count |
amount of valid items in array
gate_size_t item_capacity |
amount of possible items in allocated array space
gate_mem_copyctor_t construct_item |
copy-constructor function of a single item
gate_mem_dtor_t destruct_item |
destructor function of a single item