GATE
gate_slotlist_class Struct Reference

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
 

Detailed Description

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.

Member Data Documentation

◆ construct_item

gate_mem_copyctor_t gate_slotlist_class::construct_item

copy-constructor function of a single item

◆ data_ptr

void** gate_slotlist_class::data_ptr

pointer to first item in slot-list

◆ destruct_item

gate_mem_dtor_t gate_slotlist_class::destruct_item

destructor function of a single item

◆ item_capacity

gate_size_t gate_slotlist_class::item_capacity

amount of possible items in allocated array space

◆ item_count

gate_size_t gate_slotlist_class::item_count

amount of valid items in array

◆ item_size

gate_size_t gate_slotlist_class::item_size

size of one item in bytes


The documentation for this struct was generated from the following file: