1 #ifndef _FOUNDATION_SET_H_
2 #define _FOUNDATION_SET_H_
4 #include "foundation_library.h"
5 #include "foundation_rb.h"
7 struct foundation_set_t
{
8 struct foundation_rb_t
*root
;
11 extern struct foundation_set_t
*new_foundation_set(foundation_compare fn_c
, foundation_destroy fn_d
);
13 extern foundation_error_t
insert_foundation_set(struct foundation_set_t
*pSet
, void *key
, size_t key_size
);
15 extern foundation_bool_t
exists_foundation_set(struct foundation_set_t
*pSet
, void *key
);
17 extern foundation_error_t
remove_foundation_set(struct foundation_set_t
*pSet
, void *key
);
19 extern foundation_bool_t
find_foundation_set(struct foundation_set_t
*pSet
, void *key
, void *outKey
);
21 extern foundation_error_t
delete_foundation_set(struct foundation_set_t
*pSet
);
23 extern struct foundation_iterator_t
*new_iterator_foundation_set(struct foundation_set_t
*pSet
);
25 extern void delete_iterator_foundation_set(struct foundation_iterator_t
*pItr
);