]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
c0de361f | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | /* | |
7 | ** globSet.h | |
8 | ** | |
9 | ** based on set_template.h | |
10 | */ | |
11 | ||
12 | # ifndef globSet_H | |
13 | # define globSet_H | |
14 | ||
885824d3 | 15 | /*@iter globSet_allElements (sef globSet s, yield exposed sRef el); @*/ |
16 | # define globSet_allElements(x, m_el) sRefSet_allElements(x, m_el) | |
17 | # define end_globSet_allElements end_sRefSet_allElements | |
18 | ||
19 | extern int globSet_size (/*@sef@*/ globSet p_s); | |
20 | # define globSet_size(s) (sRefSet_size (s)) | |
21 | ||
22 | extern bool globSet_isEmpty (/*@sef@*/ globSet p_s); | |
23 | # define globSet_isEmpty(s) (globSet_size (s) == 0) | |
24 | ||
25 | extern /*@only@*/ globSet globSet_new (void) /*@*/ ; | |
28bf4b0b | 26 | |
27 | extern globSet globSet_single (/*@exposed@*/ sRef p_el) ; | |
28 | ||
29 | extern globSet globSet_insert (/*@returned@*/ globSet p_s, /*@exposed@*/ sRef p_el) | |
885824d3 | 30 | /*@modifies p_s@*/ ; |
31 | extern bool globSet_member (globSet p_s, sRef p_el) /*@*/ ; | |
32 | extern /*@exposed@*/ sRef globSet_lookup (globSet p_s, sRef p_el) /*@*/ ; | |
33 | extern void globSet_free (/*@only@*/ /*@only@*/ globSet p_s); | |
34 | extern /*@only@*/ cstring globSet_unparse (globSet p_ll) /*@*/ ; | |
35 | extern /*@only@*/ cstring globSet_dump (globSet) /*@*/ ; | |
36 | extern /*@only@*/ globSet globSet_undump (char **p_s) /*@modifies *p_s@*/ ; | |
28bf4b0b | 37 | |
b87215ab | 38 | extern /*@only@*/ globSet globSet_unionFree (/*@only@*/ /*@returned@*/ globSet p_g1, /*@only@*/ globSet p_g2) /*@modifies p_g1@*/ ; |
39 | # define globSet_unionFree(g1,g2) sRefSet_unionFree(g1,g2) | |
40 | ||
41 | ||
28bf4b0b | 42 | extern void globSet_markImmutable (globSet p_g) /*@modifies p_g@*/ ; |
43 | ||
885824d3 | 44 | extern globSet |
28bf4b0b | 45 | globSet_copyInto (/*@returned@*/ globSet p_s1, /*@exposed@*/ globSet p_s2) |
885824d3 | 46 | /*@modifies p_s1@*/ ; |
47 | ||
48 | extern /*@only@*/ globSet globSet_newCopy (globSet p_s) /*@*/ ; | |
49 | extern bool globSet_hasStatic (globSet p_s) /*@*/ ; | |
50 | ||
51 | extern int globSet_compare (globSet p_l1, globSet p_l2); | |
52 | extern void globSet_clear (globSet p_g); | |
53 | ||
54 | /*@constant null globSet globSet_undefined;@*/ | |
55 | # define globSet_undefined sRefSet_undefined | |
56 | ||
0e41eb0e | 57 | extern /*@falsewhennull@*/ bool globSet_isDefined (/*@null@*/ globSet p_s) /*@*/ ; |
58 | extern /*@nullwhentrue@*/ bool globSet_isUndefined (/*@null@*/ globSet p_s) /*@*/ ; | |
885824d3 | 59 | |
60 | # define globSet_isDefined(s) (sRefSet_isDefined (s)) | |
61 | # define globSet_isUndefined(s) (sRefSet_isUndefined (s)) | |
62 | ||
63 | # else | |
64 | # error "Multiple include" | |
65 | # endif | |
66 |