X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b582c36a70a50b376da63ceacf2354d1a47c5ac7..0f2a5c6a1ee7c87ece476402ae0a2842fd5f89f6:/include/xbt/setset.h diff --git a/include/xbt/setset.h b/include/xbt/setset.h index e5e461800b..2c11a20323 100644 --- a/include/xbt/setset.h +++ b/include/xbt/setset.h @@ -17,6 +17,12 @@ xbt_setset_t xbt_setset_new(unsigned int size); /* Destructor */ void xbt_setset_destroy(xbt_setset_t setset); +/* Add an object to the setset, this will calculate its ID */ +void xbt_setset_elm_add(xbt_setset_t setset, void *obj); + +/* Remove an object from the setset */ +void xbt_setset_elm_remove(xbt_setset_t setset, void *obj); + /* Create a new set in the setset */ xbt_setset_set_t xbt_setset_new_set(xbt_setset_t setset); @@ -24,10 +30,10 @@ xbt_setset_set_t xbt_setset_new_set(xbt_setset_t setset); void xbt_setset_destroy_set(xbt_setset_set_t); /* Insert an element into a set */ -void xbt_setset_set_insert(xbt_setset_set_t set, void* obj); +void xbt_setset_set_insert(xbt_setset_set_t set, void *obj); /* Remove an element from a set */ -void xbt_setset_set_remove(xbt_setset_set_t set, void* obj); +void xbt_setset_set_remove(xbt_setset_set_t set, void *obj); /* Remove all the elements of a set */ void xbt_setset_set_reset(xbt_setset_set_t set); @@ -39,7 +45,7 @@ void *xbt_setset_set_choose(xbt_setset_set_t set); void *xbt_setset_set_extract(xbt_setset_set_t set); /* Test if an element belongs to a set */ -int xbt_setset_set_belongs(xbt_setset_set_t set, void* obj); +int xbt_setset_set_belongs(xbt_setset_set_t set, void *obj); /* Get the number of elements in a set */ int xbt_setset_set_size(xbt_setset_set_t set); @@ -54,7 +60,8 @@ void xbt_setset_substract(xbt_setset_set_t set1, xbt_setset_set_t set2); void xbt_setset_intersect(xbt_setset_set_t set1, xbt_setset_set_t set2); /* Get the cursor to point to the first element of a set */ -void xbt_setset_cursor_first(xbt_setset_set_t set, xbt_setset_cursor_t *cursor); +void xbt_setset_cursor_first(xbt_setset_set_t set, + xbt_setset_cursor_t * cursor); /* Get the data pointed by a cursor */ int xbt_setset_cursor_get_data(xbt_setset_cursor_t cursor, void **data); @@ -66,6 +73,6 @@ void xbt_setset_cursor_next(xbt_setset_cursor_t cursor); #define xbt_setset_foreach(set, cursor, data) \ for(xbt_setset_cursor_first(set, &cursor); \ xbt_setset_cursor_get_data(cursor, (void **)&data); \ - xbt_setset_cursor_next(cursor)) + xbt_setset_cursor_next(cursor)) -#endif \ No newline at end of file +#endif