Go to the documentation of this file.
16#if defined(__cplusplus)
20#define ISL_DECLARE_LIST_TYPE2(EL,EXPORT) \
22struct EXPORT isl_##EL##_list; \
23typedef struct isl_##EL##_list isl_##EL##_list;
24#define ISL_DECLARE_LIST_TYPE(EL) \
25 ISL_DECLARE_LIST_TYPE2(EL,)
26#define ISL_DECLARE_EXPORTED_LIST_TYPE(EL) \
27 ISL_DECLARE_LIST_TYPE2(EL,__isl_export)
28#define ISL_DECLARE_LIST_FN3(EL,CONSTRUCTOR,EXPORT) \
29isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \
31__isl_give isl_##EL##_list *isl_##EL##_to_list(__isl_take isl_##EL *el);\
33__isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \
34 __isl_take isl_##EL *el); \
36__isl_give isl_##EL##_list *isl_##EL##_list_alloc(isl_ctx *ctx, int n); \
37__isl_give isl_##EL##_list *isl_##EL##_list_copy( \
38 __isl_keep isl_##EL##_list *list); \
39__isl_null isl_##EL##_list *isl_##EL##_list_free( \
40 __isl_take isl_##EL##_list *list); \
42__isl_give isl_##EL##_list *isl_##EL##_list_add( \
43 __isl_take isl_##EL##_list *list, \
44 __isl_take isl_##EL *el); \
46__isl_give isl_##EL##_list *isl_##EL##_list_insert( \
47 __isl_take isl_##EL##_list *list, unsigned pos, \
48 __isl_take isl_##EL *el); \
50__isl_give isl_##EL##_list *isl_##EL##_list_drop( \
51 __isl_take isl_##EL##_list *list, unsigned first, unsigned n); \
53__isl_give isl_##EL##_list *isl_##EL##_list_clear( \
54 __isl_take isl_##EL##_list *list); \
55__isl_give isl_##EL##_list *isl_##EL##_list_swap( \
56 __isl_take isl_##EL##_list *list, unsigned pos1, \
58__isl_give isl_##EL##_list *isl_##EL##_list_reverse( \
59 __isl_take isl_##EL##_list *list); \
61__isl_give isl_##EL##_list *isl_##EL##_list_concat( \
62 __isl_take isl_##EL##_list *list1, \
63 __isl_take isl_##EL##_list *list2); \
65isl_size isl_##EL##_list_size(__isl_keep isl_##EL##_list *list); \
66isl_size isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list); \
68__isl_give isl_##EL *isl_##EL##_list_get_at( \
69 __isl_keep isl_##EL##_list *list, int index); \
70__isl_give struct isl_##EL *isl_##EL##_list_get_##EL( \
71 __isl_keep isl_##EL##_list *list, int index); \
73__isl_give isl_##EL##_list *isl_##EL##_list_set_at( \
74 __isl_take isl_##EL##_list *list, int index, \
75 __isl_take isl_##EL *el); \
76__isl_give struct isl_##EL##_list *isl_##EL##_list_set_##EL( \
77 __isl_take struct isl_##EL##_list *list, int index, \
78 __isl_take struct isl_##EL *el); \
80isl_stat isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \
81 isl_stat (*fn)(__isl_take isl_##EL *el, void *user), \
83isl_bool isl_##EL##_list_every(__isl_keep isl_##EL##_list *list, \
84 isl_bool (*test)(__isl_keep isl_##EL *el, void *user), \
86__isl_give isl_##EL##_list *isl_##EL##_list_map( \
87 __isl_take isl_##EL##_list *list, \
88 __isl_give isl_##EL * (*fn)(__isl_take isl_##EL *el, \
91__isl_give isl_##EL##_list *isl_##EL##_list_sort( \
92 __isl_take isl_##EL##_list *list, \
93 int (*cmp)(__isl_keep struct isl_##EL *a, \
94 __isl_keep struct isl_##EL *b, \
95 void *user), void *user); \
97isl_stat isl_##EL##_list_foreach_scc(__isl_keep isl_##EL##_list *list, \
98 isl_bool (*follows)(__isl_keep isl_##EL *a, \
99 __isl_keep isl_##EL *b, void *user), \
100 void *follows_user, \
101 isl_stat (*fn)(__isl_take isl_##EL##_list *scc, void *user), \
103__isl_give char *isl_##EL##_list_to_str( \
104 __isl_keep isl_##EL##_list *list); \
105__isl_give isl_printer *isl_printer_print_##EL##_list( \
106 __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \
107void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list);
108#define ISL_DECLARE_LIST_FN(EL) \
109 ISL_DECLARE_LIST_FN3(EL,,)
110#define ISL_DECLARE_EXPORTED_LIST_FN(EL) \
111 ISL_DECLARE_LIST_FN3(EL,__isl_constructor,__isl_export)
112#define ISL_DECLARE_LIST_FN_READ2(EL,CONSTRUCTOR) \
114__isl_give isl_##EL##_list *isl_##EL##_list_read_from_str( \
115 isl_ctx *ctx, const char *str);
116#define ISL_DECLARE_LIST_FN_READ(EL) \
117 ISL_DECLARE_LIST_FN_READ2(EL,)
118#define ISL_DECLARE_EXPORTED_LIST_FN_READ(EL) \
119 ISL_DECLARE_LIST_FN_READ2(EL,__isl_constructor)
121#define ISL_DECLARE_LIST(EL) \
122 ISL_DECLARE_LIST_TYPE(EL) \
123 ISL_DECLARE_LIST_FN(EL)
124#define ISL_DECLARE_EXPORTED_LIST(EL) \
125 ISL_DECLARE_EXPORTED_LIST_TYPE(EL) \
126 ISL_DECLARE_EXPORTED_LIST_FN(EL)
128#if defined(__cplusplus)