coll  0.1.0-alpha.1
A collections library
Data Fields
arraylist_t Struct Reference

#include <coll_arraylist.h>

Data Fields

size_t capacity
 
size_t size
 
arraylist_free_function * free_fn
 
void ** array
 

Detailed Description

This struct represents the ArrayList and its pointer is the user's handle to the arraylist.

The values in the struct should be considered readonly, and should not be modified by user of the arraylist. User should always use the public methods of this implementation.

The capacity member of the struct shows the maximum number of items this arraylist can hold. This number should be carefully chosen at the time of creation of the arraylist.

The size holds the count of items currently in the list.

The array member is a pointer to an array of void pointers, each of which point to one value. Each value inserted in the array must be allocated by the caller and the function to free the items must be passed to the constructor.


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