-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
37 unsigned int starting_capacity,
-
38 unsigned char growth_factor,
-
39 bool is_multithread_safe);
-
-
-
-
-
-
-
65 const unsigned int index);
-
-
-
75 const unsigned int index);
-
-
-
-
-
-
-
-
109 const unsigned int index);
-
-
-
-
-
-
-
136 const unsigned int new_capacity);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
bool dynamic_array_release(const dynamic_array *array)
Decrement the owner count for shared ownership.
-
dynamic_array * dynamic_array_create(size_t item_size, unsigned int starting_capacity, unsigned char growth_factor, bool is_multithread_safe)
Create and initialize a new dynamic array.
-
void dynamic_array_clear(const dynamic_array *array)
Clear all elements from the array.
-
bool dynamic_array_append(const dynamic_array *array, const void *element)
Append an element to the end of the array.
-
const void * dynamic_array_get_const_pointer_to_index(const dynamic_array *array, const unsigned int index)
Get a const pointer to the element at the specified index.
-
bool dynamic_array_remove(const dynamic_array *array, const unsigned int index)
Remove an element at the specified index.
-
bool dynamic_array_is_empty(const dynamic_array *array)
Check if the array is empty.
-
bool dynamic_array_pop(const dynamic_array *array)
Remove the last element from the array.
-
unsigned int dynamic_array_get_capacity(const dynamic_array *array)
Get the total capacity of the array.
-
void * dynamic_array_get_pointer_to_index(const dynamic_array *array, const unsigned int index)
Get a pointer to the element at the specified index.
-
bool dynamic_array_increase_capacity(const dynamic_array *array, const unsigned int new_capacity)
Reserve additional capacity without changing size.
-
bool dynamic_array_clone(const dynamic_array *original_array, const dynamic_array *new_array)
Creates a deep copy of the array.
-
unsigned short dynamic_array_get_owner_count(const dynamic_array *array)
Get the current owner count.
-
bool dynamic_array_acquire(const dynamic_array *array)
Increment the owner count for shared ownership.
-
unsigned int dynamic_array_get_occupancy(const dynamic_array *array)
Get the number of elements currently in the array.
-
bool dynamic_array_is_thread_safe(const dynamic_array *array)
Check if the array is thread-safe.
-
Definition marigold_dynamic_array.h:9
-
unsigned short owner_count
Definition marigold_dynamic_array.h:17
-
void * memory_block_pointer
Definition marigold_dynamic_array.h:11
-
size_t item_size
Definition marigold_dynamic_array.h:10
-
unsigned int current_capacity
Definition marigold_dynamic_array.h:14
-
unsigned char growth_factor
Definition marigold_dynamic_array.h:19
-
unsigned int starting_capacity
Definition marigold_dynamic_array.h:13
-
unsigned int current_size
Definition marigold_dynamic_array.h:15
-
bool is_multithread_safe
Definition marigold_dynamic_array.h:20
-