55 #if !defined(__AMXC_SET_H__)
56 #define __AMXC_SET_H__
Ambiorix linked list API header file.
void(* amxc_set_alert_t)(amxc_set_t *set, const char *flag, bool value, void *priv)
Flag set alert handler type.
void amxc_set_remove_flag(amxc_set_t *set, const char *flag)
Removes a flag from a set or decreases the flag counter.
char * amxc_set_to_string_sep(const amxc_set_t *const set, const char *sep)
Converts a set to a separated string of flags.
int amxc_set_new(amxc_set_t **set, bool counted)
Allocates a set.
void amxc_set_reset(amxc_set_t *set)
Reset or empty a set, i.e. clear all flags.
amxc_set_t * amxc_set_copy(const amxc_set_t *const set)
Copies a set.
void amxc_set_intersect(amxc_set_t *const set, const amxc_set_t *const operand)
Intersect a set with another set.
bool amxc_set_is_equal(const amxc_set_t *const set1, const amxc_set_t *const set2)
Compare two sets.
void amxc_set_add_flag(amxc_set_t *set, const char *flag)
Adds a flag to a set, or increases the flag counter.
void amxc_set_delete(amxc_set_t **set)
Frees a set.
void amxc_set_symmetric_difference(amxc_set_t *const set, const amxc_set_t *const operand)
Calculates the symmetric difference of two sets.
int amxc_set_init(amxc_set_t *const set, bool counted)
Initializes a set.
char * amxc_set_to_string(const amxc_set_t *const set)
Converts a set to a space-separated string of flags.
uint32_t amxc_set_get_count(const amxc_set_t *const set, const char *flag)
Get a flag counter.
struct _flag amxc_flag_t
The flag structure.
int amxc_set_parse(amxc_set_t *set, const char *str)
Parses a space-separated string of flags and adds them to the set.
void amxc_set_clean(amxc_set_t *const set)
Cleans a set.
void amxc_set_union(amxc_set_t *const set, const amxc_set_t *const operand)
Joins two sets.
bool amxc_set_has_flag(const amxc_set_t *const set, const char *flag)
Check if a set contains a flag.
void amxc_set_alert_cb(amxc_set_t *set, amxc_set_alert_t handler, void *priv)
Install a set alert callback function.
void amxc_set_subtract(amxc_set_t *const set, const amxc_set_t *const operand)
Subtract a set from another set.
The linked list iterator structure.
The linked list structure.
amxc_set_alert_t alert_handler