]> andersk Git - splint.git/blame - src/Headers/annotationTable.h
Temporarily set flags to splintme without warnings.
[splint.git] / src / Headers / annotationTable.h
CommitLineData
28bf4b0b 1/*
2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3** See ../LICENSE for license information.
4*/
5/*
6** annotationTable.h
7**
8** A global table that keeps information on the user-defined annotations.
9**
10** For each annotation, we need:
11**
12** o [key] A name (matches @name@ in code)
13** o State - index into metaStateTable that identifies the state associated with this annotation
14** o Value
15** o Context information (where can annotation be used)
16*/
17
18# ifndef ANNOTTABLE_H
19# define ANNOTTABLE_H
20
21/*@constant null annotationTable annotationTable_undefined; @*/
22# define annotationTable_undefined genericTable_undefined
23
0e41eb0e 24extern /*@falsewhennull@*/ bool annotationTable_isDefined(annotationTable) /*@*/ ;
28bf4b0b 25# define annotationTable_isDefined(p_h) (genericTable_isDefined ((genericTable) (p_h)))
26
0e41eb0e 27extern /*@nullwhentrue@*/ bool annotationTable_isUndefined(annotationTable) /*@*/ ;
28bf4b0b 28# define annotationTable_isUndefined(p_h) (genericTable_isDefined ((genericTable) (p_h)))
29
30/*@constant int DEFAULT_ANNOTTABLE_SIZE@*/
31# define DEFAULT_ANNOTTABLE_SIZE 32
32
33extern /*@only@*/ annotationTable annotationTable_create (void) /*@*/ ;
34# define annotationTable_create() ((annotationTable) genericTable_create (DEFAULT_ANNOTTABLE_SIZE))
35
36extern void annotationTable_insert (annotationTable p_h, /*@only@*/ annotationInfo p_annotation);
37
38extern /*@null@*/ /*@dependent@*/ /*@exposed@*/ annotationInfo
39 annotationTable_lookup (annotationTable p_h, cstring p_key) /*@*/ ;
393e573f 40/*@access annotationInfo@*/
28bf4b0b 41# define annotationTable_lookup(p_h,p_key) \
393e573f 42 ((annotationInfo) genericTable_lookup ((genericTable) (p_h), p_key))
43/*@noaccess annotationInfo@*/
28bf4b0b 44
45extern bool annotationTable_contains (annotationTable p_h, cstring p_key) /*@*/ ;
46# define annotationTable_contains(p_h,p_key) \
47 (genericTable_contains ((genericTable) (p_h), p_key))
48
49extern /*@unused@*/ /*@only@*/ cstring annotationTable_stats(annotationTable p_h);
50# define annotationTable_stats(p_h) genericTable_stats ((genericTable) (p_h))
51
52extern /*@only@*/ cstring annotationTable_unparse (annotationTable p_h);
53
54extern void annotationTable_free (/*@only@*/ annotationTable p_h);
55# define annotationTable_free(p_h) (genericTable_free ((genericTable) (p_h)))
56
57/*@iter annotationTable_elements (sef annotationTable p_g,
58 yield exposed cstring m_key,
59 yield exposed annotationInfo m_el) @*/
60
61# define annotationTable_elements(p_g,m_key,m_el) \
62 genericTable_elements((genericTable) (p_g), m_key, m_el)
63# define end_annotationTable_elements end_genericTable_elements
64
65extern int annotationTable_size (annotationTable p_h);
66# define annotationTable_size(p_h) (genericTable_size(p_h))
67
68# else
69# error "Multiple include"
70# endif
71
72
73
74
This page took 0.067336 seconds and 5 git commands to generate.