]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
28bf4b0b | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. |
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 | |
38 | extern void globSet_markImmutable (globSet p_g) /*@modifies p_g@*/ ; | |
39 | ||
885824d3 | 40 | extern globSet |
28bf4b0b | 41 | globSet_copyInto (/*@returned@*/ globSet p_s1, /*@exposed@*/ globSet p_s2) |
885824d3 | 42 | /*@modifies p_s1@*/ ; |
43 | ||
44 | extern /*@only@*/ globSet globSet_newCopy (globSet p_s) /*@*/ ; | |
45 | extern bool globSet_hasStatic (globSet p_s) /*@*/ ; | |
46 | ||
47 | extern int globSet_compare (globSet p_l1, globSet p_l2); | |
48 | extern void globSet_clear (globSet p_g); | |
49 | ||
50 | /*@constant null globSet globSet_undefined;@*/ | |
51 | # define globSet_undefined sRefSet_undefined | |
52 | ||
53 | extern /*@falsenull@*/ bool globSet_isDefined (/*@null@*/ globSet p_s) /*@*/ ; | |
54 | extern /*@truenull@*/ bool globSet_isUndefined (/*@null@*/ globSet p_s) /*@*/ ; | |
55 | ||
56 | # define globSet_isDefined(s) (sRefSet_isDefined (s)) | |
57 | # define globSet_isUndefined(s) (sRefSet_isUndefined (s)) | |
58 | ||
59 | # else | |
60 | # error "Multiple include" | |
61 | # endif | |
62 |