2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
7 # ifndef MTLoseReferenceLIST_H
8 # define MTLoseReferenceLIST_H
10 /*@private@*/ typedef /*@only@*/ mtLoseReference o_mtLoseReference;
12 struct s_mtLoseReferenceList
16 /*@reldef@*/ /*@relnull@*/ o_mtLoseReference *elements;
19 /*@constant null mtLoseReferenceList mtLoseReferenceList_undefined;@*/
20 # define mtLoseReferenceList_undefined ((mtLoseReferenceList) NULL)
22 extern /*@falsenull@*/ bool mtLoseReferenceList_isDefined (mtLoseReferenceList p_s) /*@*/ ;
23 # define mtLoseReferenceList_isDefined(s) ((s) != mtLoseReferenceList_undefined)
25 extern int mtLoseReferenceList_size (/*@sef@*/ mtLoseReferenceList) /*@*/ ;
26 # define mtLoseReferenceList_size(s) (mtLoseReferenceList_isDefined (s) ? (s)->nelements : 0)
28 extern /*@unused@*/ /*@falsenull@*/ bool mtLoseReferenceList_empty (/*@sef@*/ mtLoseReferenceList) /*@*/ ;
29 # define mtLoseReferenceList_empty(s) (mtLoseReferenceList_size(s) == 0)
31 extern cstring mtLoseReferenceList_unparseSep (mtLoseReferenceList p_s, cstring p_sep) /*@*/ ;
33 extern /*@unused@*/ /*@only@*/ mtLoseReferenceList mtLoseReferenceList_new (void) /*@*/ ;
35 extern /*@only@*/ mtLoseReferenceList mtLoseReferenceList_single (/*@keep@*/ mtLoseReference p_el) /*@*/ ;
37 extern mtLoseReferenceList
38 mtLoseReferenceList_add (/*@returned@*/ mtLoseReferenceList p_s, /*@keep@*/ mtLoseReference p_el)
41 extern mtLoseReferenceList
42 mtLoseReferenceList_prepend (/*@returned@*/ mtLoseReferenceList p_s, /*@keep@*/ mtLoseReference p_el)
45 extern /*@unused@*/ /*@only@*/ cstring mtLoseReferenceList_unparse (mtLoseReferenceList p_s) ;
46 extern void mtLoseReferenceList_free (/*@only@*/ mtLoseReferenceList p_s) ;
48 /*@constant int mtLoseReferenceListBASESIZE;@*/
49 # define mtLoseReferenceListBASESIZE MIDBASESIZE
51 /*@iter mtLoseReferenceList_elements (sef mtLoseReferenceList x, yield exposed mtLoseReference el); @*/
52 # define mtLoseReferenceList_elements(x, m_el) \
53 { if (mtLoseReferenceList_isDefined (x)) { \
54 int m_ind; mtLoseReference *m_elements = &((x)->elements[0]); \
55 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
56 { mtLoseReference m_el = *(m_elements++);
58 # define end_mtLoseReferenceList_elements }}}
61 # error "Multiple include"