36 #define INITIAL_CAPACITY 16
39 #define RESIZE_FACTOR 2
void * sld_vector_get(sld_vector *vector, int index)
Returns an object from an sld_vector at index.
Definition: vector.c:118
int object_count
Definition: vector.h:46
SLD_SSINT sld_vector_add(sld_vector *vector, void *object)
Adds an object to a sld_vector.
Definition: vector.c:99
void sld_vector_delete(sld_vector *vector, SLD_UINT index)
Removes an object from a sld_vector at the specified index.
Definition: vector.c:142
SLD_UINT sld_vector_size(sld_vector *vector)
Returns the capacity of a sld_vector.
Definition: vector.c:74
struct sld_vector sld_vector
void sld_vector_free(sld_vector *vector)
Frees any memory allocated for an initialized sld_vector.
Definition: vector.c:165
void ** objects
Definition: vector.h:44
signed short int SLD_SSINT
Definition: types.h:47
int capacity
Definition: vector.h:45
SLD_SSINT sld_vector_init_size(sld_vector *vector, int size)
Initializes a sld_vector with the specified size.
Definition: vector.c:51
void * sld_vector_pop(sld_vector *vector)
Returns and removes the last object in a sld_vector.
Definition: vector.c:132
SLD_SSINT sld_vector_init(sld_vector *vector)
Initializes a sld_vector.
Definition: vector.c:33
unsigned int SLD_UINT
Definition: types.h:56
void sld_vector_set(sld_vector *vector, int index, void *object)
Sets the data residing at the specified index in a sld_vector.
Definition: vector.c:125
SLD_UINT sld_vector_objects(sld_vector *vector)
Returns the number of objects contained within a sld_vector.
Definition: vector.c:69
SLD_SSINT sld_vector_resize(sld_vector *vector, int new_size)
Resizes a sld_vector to the specified size.
Definition: vector.c:79