NAME

src/pmc/packfileannotations.pmc - PackfileAnnotations PMC

DESCRIPTION

This class implements a PackfileAnnotations object, a segment of the .pbc data file used for listing annotations. It is a container for PackfileAnnotation objects.

See packfile.pmc for the toplevel Packfile interface, see packfilesegment.pmc for the list of common methods every packfile segment pmc must implement; see PDD13 for the design spec.

Methods

PMC *get_key_list()
Get the PackfileAnnotationKeys PMC, listing the keys and types of annotations contained within this object.
INTVAL elements()
Get the number of elements in the array.
PMC *get_pmc_keyed_int(INTVAL index)
Fetch an annotation PMC from the array.
void set_pmc_keyed_int(INTVAL index, PMC *annotation)
Add an annotation to the array at the given offset. An exception will be thrown unless all of the following criteria are met:
- The type of the PMC passed is PackfileAnnotation
- The entry at the previous index is defined
- The offset of the previous entry is less than this entry
- The offset of the next entry, if it exists, is greater than this entry
- The key ID references a valid annotation key