A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ensures that runall is never called on empty set
[simgrid.git]
/
include
/
xbt
/
setset.h
diff --git
a/include/xbt/setset.h
b/include/xbt/setset.h
index e5e461800b347231c3fa95cf4e9c3f971a692204..2c11a2032364369a47a0bea15d5e9e158f22ac40 100644
(file)
--- 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);
/* 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);
/* 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_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 */
/* 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);
/* 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 */
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);
/* 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_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);
/* 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); \
#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