|
Salad
1.0.15
|
Data Structures | |
| struct | sld_vector |
Macros | |
| #define | INITIAL_CAPACITY 16 |
| #define | RESIZE_FACTOR 2 |
Typedefs | |
| typedef struct sld_vector | sld_vector |
Functions | |
| SLD_SSINT | sld_vector_init (sld_vector *vector) |
| Initializes a sld_vector. More... | |
| SLD_SSINT | sld_vector_init_size (sld_vector *vector, int size) |
| Initializes a sld_vector with the specified size. More... | |
| SLD_UINT | sld_vector_objects (sld_vector *vector) |
| Returns the number of objects contained within a sld_vector. More... | |
| SLD_UINT | sld_vector_size (sld_vector *vector) |
| Returns the capacity of a sld_vector. More... | |
| SLD_SSINT | sld_vector_resize (sld_vector *vector, int new_size) |
| Resizes a sld_vector to the specified size. More... | |
| SLD_SSINT | sld_vector_add (sld_vector *vector, void *object) |
| Adds an object to a sld_vector. More... | |
| void * | sld_vector_get (sld_vector *vector, int index) |
| Returns an object from an sld_vector at index. More... | |
| void | sld_vector_set (sld_vector *vector, int index, void *object) |
| Sets the data residing at the specified index in a sld_vector. More... | |
| void * | sld_vector_pop (sld_vector *vector) |
| Returns and removes the last object in a sld_vector. More... | |
| void | sld_vector_delete (sld_vector *vector, SLD_UINT index) |
| Removes an object from a sld_vector at the specified index. More... | |
| void | sld_vector_free (sld_vector *vector) |
| Frees any memory allocated for an initialized sld_vector. More... | |
This module contains functions, macros, and structures related to sld_vector objects.
| #define INITIAL_CAPACITY 16 |
Default initial capacity for a sld_vector
| #define RESIZE_FACTOR 2 |
Double or halve a sld_vector during a resize operation
| typedef struct sld_vector sld_vector |
A sld_vector is a resizeable array
|
related |
Adds an object to a sld_vector.
| vector | an initialized sld_vector |
| object | an arbitrary object |
|
related |
Removes an object from a sld_vector at the specified index.
| vector | an initialized sld_vector |
| index | an index where an object resides within the sld_vector |
|
related |
Frees any memory allocated for an initialized sld_vector.
| vector | an initialized sld_vector |
|
related |
Returns an object from an sld_vector at index.
| vector | an initialized sld_vector |
| index | an index where an object resides within the sld_vector |
|
related |
Initializes a sld_vector.
| vector | an uninitialized sld_vector |
|
related |
Initializes a sld_vector with the specified size.
| vector | an uninitialized sld_vector |
| size | an initial size |
|
related |
Returns the number of objects contained within a sld_vector.
| vector | an initialized sld_vector |
|
related |
Returns and removes the last object in a sld_vector.
| vector | an initialized sld_vector |
|
related |
Resizes a sld_vector to the specified size.
| vector | an initialized sld_vector |
| new_size | the new size of the sld_vector |
|
related |
Sets the data residing at the specified index in a sld_vector.
| vector | an initialized sld_vector |
| index | an index where an object may reside within the sld_vector |
| object | an arbitrary object |
|
related |
Returns the capacity of a sld_vector.
| vector | an initialized sld_vector |
1.8.5