2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
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 int DEFAULT_ANNOTTABLE_SIZE@*/
22 # define DEFAULT_ANNOTTABLE_SIZE 32
24 extern /*@only@*/ annotationTable
annotationTable_create (void) /*@*/ ;
25 # define annotationTable_create() ((annotationTable) genericTable_create (DEFAULT_ANNOTTABLE_SIZE))
27 extern void annotationTable_insert (annotationTable p_h
, /*@only@*/ annotationInfo p_annotation
);
29 extern /*@null@*/ /*@dependent@*/ /*@exposed@*/ annotationInfo
30 annotationTable_lookup (annotationTable p_h
, cstring p_key
) /*@*/ ;
31 /*@access annotationInfo@*/
32 # define annotationTable_lookup(p_h,p_key) \
33 ((annotationInfo) genericTable_lookup ((genericTable) (p_h), p_key))
34 /*@noaccess annotationInfo@*/
36 extern bool annotationTable_contains (annotationTable p_h
, cstring p_key
) /*@*/ ;
37 # define annotationTable_contains(p_h,p_key) \
38 (genericTable_contains ((genericTable) (p_h), p_key))
40 extern /*@only@*/ cstring
annotationTable_unparse (annotationTable p_h
);
42 extern void annotationTable_free (/*@only@*/ annotationTable p_h
);
43 # define annotationTable_free(p_h) (genericTable_free ((genericTable) (p_h)))
45 /*@iter annotationTable_elements (sef annotationTable p_g,
46 yield exposed cstring m_key,
47 yield exposed annotationInfo m_el) @*/
49 # define annotationTable_elements(p_g,m_key,m_el) \
50 genericTable_elements((genericTable) (p_g), m_key, m_el)
51 # define end_annotationTable_elements end_genericTable_elements
54 # error "Multiple include"