]> andersk Git - splint.git/blame - src/Headers/annotationTable.h
Added manual files
[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
24extern /*@falsenull@*/ bool annotationTable_isDefined(annotationTable) /*@*/ ;
25# define annotationTable_isDefined(p_h) (genericTable_isDefined ((genericTable) (p_h)))
26
27extern /*@truenull@*/ bool annotationTable_isUndefined(annotationTable) /*@*/ ;
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) /*@*/ ;
40# define annotationTable_lookup(p_h,p_key) \
41 (/*@i32@*/ (annotationInfo) genericTable_lookup ((genericTable) (p_h), p_key))
42
43extern bool annotationTable_contains (annotationTable p_h, cstring p_key) /*@*/ ;
44# define annotationTable_contains(p_h,p_key) \
45 (genericTable_contains ((genericTable) (p_h), p_key))
46
47extern /*@unused@*/ /*@only@*/ cstring annotationTable_stats(annotationTable p_h);
48# define annotationTable_stats(p_h) genericTable_stats ((genericTable) (p_h))
49
50extern /*@only@*/ cstring annotationTable_unparse (annotationTable p_h);
51
52extern void annotationTable_free (/*@only@*/ annotationTable p_h);
53# define annotationTable_free(p_h) (genericTable_free ((genericTable) (p_h)))
54
55/*@iter annotationTable_elements (sef annotationTable p_g,
56 yield exposed cstring m_key,
57 yield exposed annotationInfo m_el) @*/
58
59# define annotationTable_elements(p_g,m_key,m_el) \
60 genericTable_elements((genericTable) (p_g), m_key, m_el)
61# define end_annotationTable_elements end_genericTable_elements
62
63extern int annotationTable_size (annotationTable p_h);
64# define annotationTable_size(p_h) (genericTable_size(p_h))
65
66# else
67# error "Multiple include"
68# endif
69
70
71
72
This page took 0.168241 seconds and 5 git commands to generate.