100 if(index == UINT32_MAX) {
120 const uint32_t index) {
121 uint32_t type_id = -1;
127 if(hit == &type->
hit) {
221 const char* name = NULL;
#define when_not_null(x, l)
#define when_failed(x, l)
static int amxc_var_allocate_types(void)
static amxc_array_t amxc_array_types
amxc_var_type_t * amxc_var_get_type(uint32_t type_id)
uint32_t PRIVATE amxc_var_add_type(amxc_var_type_t *const type, const uint32_t index)
amxc_array_t * amxc_variant_get_types_array(void)
static amxc_htable_t amxc_variant_types
int PRIVATE amxc_var_remove_type(amxc_var_type_t *const type)
static amxc_array_it_t * amxc_var_get_type_position(const uint32_t index)
static amxc_array_it_t * amxc_var_next_available_id(void)
static void amxc_var_free_types(void)
Ambiorix ring buffer API header file.
amxc_array_it_t * amxc_array_it_get_next_free(const amxc_array_it_t *const reference)
Gets the next free item in the array, starting from the provided array iterator.
int amxc_array_it_set_data(amxc_array_it_t *const it, void *data)
Sets the data pointer of an array iterator.
void * amxc_array_it_take_data(amxc_array_it_t *const it)
Gets and removes a data pointer from the iterator.
unsigned int amxc_array_it_index(const amxc_array_it_t *const it)
Gets the index of the iterator in the array.
int amxc_array_init(amxc_array_t *const array, const size_t items)
Initializes an array.
amxc_array_it_t * amxc_array_get_at(const amxc_array_t *const array, const unsigned int index)
Gets the item iterator for the given index.
void amxc_array_clean(amxc_array_t *const array, amxc_array_it_delete_t func)
Removes all items from the array.
int amxc_array_grow(amxc_array_t *const array, const size_t items)
Expands the array.
int amxc_htable_it_init(amxc_htable_it_t *const it)
Initializes a hash table.iterator.
void amxc_htable_it_clean(amxc_htable_it_t *const it, amxc_htable_it_delete_t func)
Removes the iterator from the htable and frees allocated memory.
void amxc_htable_it_take(amxc_htable_it_t *const it)
Removes the iterator from the hash table.
#define amxc_htable_it_get_data(it, type, member)
Gets the data pointer from an hash table iterator.
int amxc_htable_init(amxc_htable_t *const htable, const size_t reserve)
Initializes a hash table.
AMXC_INLINE bool amxc_htable_is_empty(const amxc_htable_t *const htable)
Checks that the hash table is empty.
amxc_htable_it_t * amxc_htable_get(const amxc_htable_t *const htable, const char *const key)
Gets a hash table iterator from the hash table.
int amxc_htable_insert(amxc_htable_t *const htable, const char *const key, amxc_htable_it_t *const it)
Inserts an item in the hash table.
void amxc_htable_clean(amxc_htable_t *const htable, amxc_htable_it_delete_t func)
Removes all items from the hash table.
#define AMXC_VAR_ID_CUSTOM_BASE
Base variant id for custom variants.
#define AMXC_VAR_ID_MAX
Same as AMXC_VAR_ID_INVALID.
uint32_t amxc_var_register_type(amxc_var_type_t *const type)
Register a new variant type.
uint32_t amxc_var_get_type_id_from_name(const char *const name)
Get the type id.
int amxc_var_unregister_type(amxc_var_type_t *const type)
Unregisters an already registered variant type.
const char * amxc_var_get_type_name_from_id(const uint32_t type_id)
Get the type name.
The array iterator structure.
The hash table iterator structure.
The hash table structure.
A variant type structure.
static amxc_htable_it_t it[2000]