libamxc  1.10.3
C Generic Data Containers
_amxc_array Struct Reference

The array structure. More...

#include <amxc_array.h>

Collaboration diagram for _amxc_array:

Data Fields

size_t items
 
size_t first_used
 
size_t last_used
 
struct _amxc_array_itbuffer
 

Detailed Description

The array structure.

The number of available items in the allocated buffer is tracked in the items member of this structure. C does not provide any standard way to get the size of an allocated memory block.

The structure also contains the first_used and last_used members. These are mainly used to be able to add data after the last taken position or to add data before the first taken position.

Alternatively the functions inserting data after or before can iterate over the array start from the end or from the beginning, this could have some significant impact on the performance of these functions.

Although the members of this structure are publicly available it is not recommended to access them directly, use the provided functions.

Definition at line 162 of file amxc_array.h.

Field Documentation

◆ buffer

struct _amxc_array_it* _amxc_array::buffer

The array buffer

Definition at line 166 of file amxc_array.h.

◆ first_used

size_t _amxc_array::first_used

First used index

Definition at line 164 of file amxc_array.h.

◆ items

size_t _amxc_array::items

Number of items in the array

Definition at line 163 of file amxc_array.h.

◆ last_used

size_t _amxc_array::last_used

Highest used index

Definition at line 165 of file amxc_array.h.


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