2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
8 ** A global table that keeps information on the user-defined annotations.
10 ** For each annotation, we need:
12 ** o [key] A name (matches @name@ in code)
13 ** o State - index into metaStateTable that identifies the state associated with this annotation
15 ** o Context information (where can annotation be used)
21 /*@constant null annotationTable annotationTable_undefined; @*/
22 # define annotationTable_undefined genericTable_undefined
24 extern /*@falsenull@*/ bool annotationTable_isDefined(annotationTable) /*@*/ ;
25 # define annotationTable_isDefined(p_h) (genericTable_isDefined ((genericTable) (p_h)))
27 extern /*@truenull@*/ bool annotationTable_isUndefined(annotationTable) /*@*/ ;
28 # define annotationTable_isUndefined(p_h) (genericTable_isDefined ((genericTable) (p_h)))
30 /*@constant int DEFAULT_ANNOTTABLE_SIZE@*/
31 # define DEFAULT_ANNOTTABLE_SIZE 32
33 extern /*@only@*/ annotationTable annotationTable_create (void) /*@*/ ;
34 # define annotationTable_create() ((annotationTable) genericTable_create (DEFAULT_ANNOTTABLE_SIZE))
36 extern void annotationTable_insert (annotationTable p_h, /*@only@*/ annotationInfo p_annotation);
38 extern /*@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))
43 extern 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))
47 extern /*@unused@*/ /*@only@*/ cstring annotationTable_stats(annotationTable p_h);
48 # define annotationTable_stats(p_h) genericTable_stats ((genericTable) (p_h))
50 extern /*@only@*/ cstring annotationTable_unparse (annotationTable p_h);
52 extern void annotationTable_free (/*@only@*/ annotationTable p_h);
53 # define annotationTable_free(p_h) (genericTable_free ((genericTable) (p_h)))
55 /*@iter annotationTable_elements (sef annotationTable p_g,
56 yield exposed cstring m_key,
57 yield exposed annotationInfo m_el) @*/
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
63 extern int annotationTable_size (annotationTable p_h);
64 # define annotationTable_size(p_h) (genericTable_size(p_h))
67 # error "Multiple include"