2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
6 # ifndef paramNodeLIST_H
7 # define paramNodeLIST_H
9 typedef /*@null@*/ /*@only@*/ paramNode o_paramNode
;
11 abst_typedef
/*@null@*/ struct
15 /*@reldef@*/ /*@relnull@*/ o_paramNode
*elements
;
18 /*@iter paramNodeList_elements (sef paramNodeList x, yield exposed paramNode el); @*/
19 # define paramNodeList_elements(x, m_el) \
20 if (paramNodeList_isDefined (x)) \
21 { int m_ind; paramNode *m_elements = &((x)->elements[0]); \
22 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
23 { paramNode m_el = *(m_elements++);
25 # define end_paramNodeList_elements }}
27 extern int paramNodeList_size (/*@sef@*/ paramNodeList
);
29 # define paramNodeList_size(s) (paramNodeList_isDefined (s) ? (s)->nelements : 0)
31 extern bool paramNodeList_empty (/*@sef@*/ paramNodeList p_s
);
32 # define paramNodeList_empty(s) (paramNodeList_size(s) == 0)
34 extern /*@only@*/ paramNodeList
paramNodeList_single (/*@keep@*/ paramNode p_p
);
36 extern /*@falsewhennull@*/ bool paramNodeList_isDefined (paramNodeList p_s
) /*@*/ ;
37 # define paramNodeList_isDefined(s) ((s) != (paramNodeList)0)
38 extern /*@only@*/ paramNodeList
paramNodeList_new (void);
41 paramNodeList_add (/*@returned@*/ paramNodeList p_s
, /*@null@*/ /*@only@*/ paramNode p_el
) ;
43 extern /*@only@*/ cstring
paramNodeList_unparse (paramNodeList p_s
) ;
44 extern void paramNodeList_free (/*@only@*/ /*@only@*/ paramNodeList p_s
) ;
46 extern /*@only@*/ paramNodeList
paramNodeList_copy (paramNodeList p_s
) ;
47 extern /*@only@*/ cstring
paramNodeList_unparseComments (paramNodeList p_s
);
49 /*@constant int paramNodeListBASESIZE;@*/
50 # define paramNodeListBASESIZE SMALLBASESIZE
52 /*@constant null paramNodeList paramNodeList_undefined; @*/
53 # define paramNodeList_undefined ((paramNodeList) 0)
55 extern /*@nullwhentrue@*/ bool paramNodeList_isNull (/*@null@*/ paramNodeList p_p
);
57 # define paramNodeList_isNull(p) ((p) == paramNodeList_undefined)
60 # error "Multiple include"