55 #if !defined(__AMXC_VARIANT_TYPE_H__)
56 #define __AMXC_VARIANT_TYPE_H__
137 const char*
const key,
147 const char*
const key,
Ambiorix hash table API header file.
Ambiorix variant API header file.
int(* amxc_var_compare_fn_t)(const amxc_var_t *const var1, const amxc_var_t *const var2, int *const result)
Variant type callback function prototype comparing two variants of the same type.
int(* amxc_var_set_index_fn_t)(amxc_var_t *const dest, amxc_var_t *const src, const int64_t index, int flags)
Variant type callback function prototype set part of variant by index.
amxc_var_t *(* amxc_var_get_index_fn_t)(const amxc_var_t *const src, const int64_t index, int flags)
Variant type callback function prototype fetch part of variant by index.
int(* amxc_var_set_key_fn_t)(amxc_var_t *const dest, amxc_var_t *const src, const char *const key, int flags)
Variant type callback function prototype set part of variant by key.
amxc_var_t *(* amxc_var_get_key_fn_t)(const amxc_var_t *const src, const char *const key, int flags)
Variant type callback function prototype fetch part of variant by key.
int(* amxc_var_convert_fn_t)(amxc_var_t *const dest, const amxc_var_t *const src)
Variant type callback function prototype for dynamically converting one type to another.
uint32_t amxc_var_register_type(amxc_var_type_t *const type)
Register a new variant type.
void(* amxc_var_free_fn_t)(amxc_var_t *const var)
Variant type callback function prototype for freeing previous allocated memory.
amxc_var_type_t * amxc_var_get_type(unsigned int type_id)
Get the type definition structure.
uint32_t amxc_var_get_type_id_from_name(const char *const name)
Get the type id.
int(* amxc_var_move_fn_t)(amxc_var_t *const dst, amxc_var_t *const src)
Variant type callback function prototype for moving the content.
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.
int(* amxc_var_new_fn_t)(amxc_var_t *const var)
Variant type callback function prototype for initializing a variant of a certain type.
struct _amxc_var_type amxc_var_type_t
A variant type structure.
int(* amxc_var_copy_fn_t)(amxc_var_t *const dst, const amxc_var_t *const src)
Variant type callback function prototype for creating a copy.
The hash table iterator structure.
A variant type structure.
amxc_var_get_key_fn_t get_key
amxc_var_get_index_fn_t get_index
amxc_var_compare_fn_t compare
amxc_var_set_key_fn_t set_key
amxc_var_convert_fn_t convert_from
amxc_var_convert_fn_t convert_to
amxc_var_set_index_fn_t set_index
The variant struct definition.