GATE
|
A linear changable field of pointers to changable items of the same types. More...
#include <arrays.h>
Public Attributes | |
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.
gate_mem_copyctor_t gate_slotlist_class::construct_item |
copy-constructor function of a single item
void** gate_slotlist_class::data_ptr |
pointer to first item in slot-list
gate_mem_dtor_t gate_slotlist_class::destruct_item |
destructor function of a single item
gate_size_t gate_slotlist_class::item_capacity |
amount of possible items in allocated array space
gate_size_t gate_slotlist_class::item_count |
amount of valid items in array
gate_size_t gate_slotlist_class::item_size |
size of one item in bytes