2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
7 # ifndef mtDefaultsDeclLIST_H
8 # define mtDefaultsDeclLIST_H
10 /*@private@*/ typedef /*@only@*/ mtDefaultsDecl o_mtDefaultsDecl;
12 struct s_mtDefaultsDeclList
16 /*@reldef@*/ /*@relnull@*/ o_mtDefaultsDecl *elements;
19 /*@constant null mtDefaultsDeclList mtDefaultsDeclList_undefined;@*/
20 # define mtDefaultsDeclList_undefined ((mtDefaultsDeclList) NULL)
22 extern /*@falsenull@*/ bool mtDefaultsDeclList_isDefined (mtDefaultsDeclList p_s) /*@*/ ;
23 # define mtDefaultsDeclList_isDefined(s) ((s) != mtDefaultsDeclList_undefined)
25 extern int mtDefaultsDeclList_size (/*@sef@*/ mtDefaultsDeclList) /*@*/ ;
26 # define mtDefaultsDeclList_size(s) (mtDefaultsDeclList_isDefined (s) ? (s)->nelements : 0)
28 extern /*@unused@*/ /*@falsenull@*/ bool mtDefaultsDeclList_empty (/*@sef@*/ mtDefaultsDeclList) /*@*/ ;
29 # define mtDefaultsDeclList_empty(s) (mtDefaultsDeclList_size(s) == 0)
31 extern cstring mtDefaultsDeclList_unparseSep (mtDefaultsDeclList p_s, cstring p_sep) /*@*/ ;
33 extern /*@unused@*/ /*@only@*/ mtDefaultsDeclList mtDefaultsDeclList_new (void) /*@*/ ;
35 extern /*@only@*/ mtDefaultsDeclList mtDefaultsDeclList_single (/*@keep@*/ mtDefaultsDecl p_el) /*@*/ ;
37 extern mtDefaultsDeclList
38 mtDefaultsDeclList_add (/*@returned@*/ mtDefaultsDeclList p_s, /*@keep@*/ mtDefaultsDecl p_el)
41 extern mtDefaultsDeclList
42 mtDefaultsDeclList_prepend (/*@returned@*/ mtDefaultsDeclList p_s, /*@keep@*/ mtDefaultsDecl p_el)
45 extern /*@unused@*/ /*@only@*/ cstring
46 mtDefaultsDeclList_unparse (mtDefaultsDeclList p_s) ;
48 extern void mtDefaultsDeclList_free (/*@only@*/ mtDefaultsDeclList p_s) ;
50 /*@constant int mtDefaultsDeclListBASESIZE;@*/
51 # define mtDefaultsDeclListBASESIZE MIDBASESIZE
53 /*@iter mtDefaultsDeclList_elements (sef mtDefaultsDeclList x, yield exposed mtDefaultsDecl el); @*/
54 # define mtDefaultsDeclList_elements(x, m_el) \
55 { if (mtDefaultsDeclList_isDefined (x)) { \
56 int m_ind; mtDefaultsDecl *m_elements = &((x)->elements[0]); \
57 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
58 { mtDefaultsDecl m_el = *(m_elements++);
60 # define end_mtDefaultsDeclList_elements }}}
63 # error "Multiple include"