Functions for querying and accessing builder elements.
More...
Functions for querying and accessing builder elements.
◆ da_builder_capacity()
DA_DEF int da_builder_capacity |
( |
da_builder |
builder | ) |
|
Gets the current allocated capacity of the builder.
- Parameters
-
builder | Builder to query (must not be NULL) |
- Returns
- Number of elements that can be stored without reallocation
◆ da_builder_get()
DA_DEF void * da_builder_get |
( |
da_builder |
builder, |
|
|
int |
index |
|
) |
| |
Gets a pointer to an element at the specified index.
- Parameters
-
builder | Builder to access (must not be NULL) |
index | Element index (must be >= 0 and < length) |
- Returns
- Pointer to element at index
- Note
- Asserts on out-of-bounds access
◆ da_builder_length()
DA_DEF int da_builder_length |
( |
da_builder |
builder | ) |
|
Gets the current number of elements in the builder.
- Parameters
-
builder | Builder to query (must not be NULL) |
- Returns
- Number of elements currently in the builder
◆ da_builder_set()
DA_DEF void da_builder_set |
( |
da_builder |
builder, |
|
|
int |
index, |
|
|
const void * |
element |
|
) |
| |
Sets the value of an element at the specified index.
- Parameters
-
builder | Builder to modify (must not be NULL) |
index | Element index (must be >= 0 and < length) |
element | Pointer to element data to copy (must not be NULL) |
- Note
- Asserts on out-of-bounds access or NULL parameters