]> andersk Git - splint.git/blob - src/Headers/paramNodeList.h
1fe049a6564e09444a68f5c6ee9feffdb5389572
[splint.git] / src / Headers / paramNodeList.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
4 **
5 */
6 # ifndef paramNodeLIST_H
7 # define paramNodeLIST_H
8
9 typedef /*@null@*/ /*@only@*/ paramNode o_paramNode;
10
11 abst_typedef /*@null@*/ struct 
12 {
13   int nelements;
14   int nspace;
15   /*@reldef@*/ /*@relnull@*/ o_paramNode *elements;
16 } *paramNodeList ;
17
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++); 
24
25 # define end_paramNodeList_elements }}
26
27 extern int paramNodeList_size (/*@sef@*/ paramNodeList);
28
29 # define paramNodeList_size(s)  (paramNodeList_isDefined (s) ? (s)->nelements : 0)   
30
31 extern bool paramNodeList_empty (/*@sef@*/ paramNodeList p_s);
32 # define paramNodeList_empty(s) (paramNodeList_size(s) == 0)
33
34 extern /*@only@*/ paramNodeList paramNodeList_single (/*@keep@*/ paramNode p_p);
35
36 extern /*@falsewhennull@*/ bool paramNodeList_isDefined (paramNodeList p_s) /*@*/ ;
37 # define paramNodeList_isDefined(s) ((s) != (paramNodeList)0)
38 extern /*@only@*/ paramNodeList paramNodeList_new (void);
39
40 extern paramNodeList 
41   paramNodeList_add (/*@returned@*/ paramNodeList p_s, /*@null@*/ /*@only@*/ paramNode p_el) ;
42
43 extern /*@only@*/  cstring paramNodeList_unparse (paramNodeList p_s) ;
44 extern void paramNodeList_free (/*@only@*/ /*@only@*/ paramNodeList p_s) ;
45
46 extern /*@only@*/ paramNodeList paramNodeList_copy (paramNodeList p_s) ; 
47 extern /*@only@*/ cstring paramNodeList_unparseComments (paramNodeList p_s);
48
49 /*@constant int paramNodeListBASESIZE;@*/
50 # define paramNodeListBASESIZE SMALLBASESIZE
51
52 /*@constant null paramNodeList paramNodeList_undefined; @*/
53 # define paramNodeList_undefined ((paramNodeList) 0)
54
55 extern /*@nullwhentrue@*/ bool paramNodeList_isNull (/*@null@*/ paramNodeList p_p);
56
57 # define paramNodeList_isNull(p) ((p) == paramNodeList_undefined)
58
59 # else
60 # error "Multiple include"
61 # endif
62
63
64
65
This page took 0.028156 seconds and 3 git commands to generate.