The name of this label manager. This is a convenience that can be used to produce distinctive error messages, for instance.
A mapping of element id to allocated label.
A counter that must be incremented with each new label allocation. This allows the allocation algorithm to know what the next label should be.
The name of this label manager. This is a convenience that can be used to produce distinctive error messages, for instance.
Clear out the labels that were allocated. This method is called by deallocateAll to perform class-specific cleanup.
Allocate a label for an id. The relation between id and label remains constant until deallocateAll is called.
The id of the element.
The allocated label. If the method is called multiple times with
the same id
, the return value must be the same. It may change only if
deallocateAll has been called between the calls to this method.
Deallocate all mappings between ids and labels. This will reset _idToLabel to an empty map and labelIndex to 0.
Gets the label associated with an id.
The id.
The label. The value returned by this method obeys the same rules
as that of allocateLabel with the exception that if a call returned
undefined
it may return another value on a subsequent call. (That is,
an id
that did not have a label allocated to it may acquire such
label.)
Gets the next number in the number sequence. This increments labelIndex.
The number.
Generated using TypeDoc
Maintains a mapping from HTML element id to labels meaningful to humans. Also keeps a counter that can be used for assigning new ids to elements that don't already have one.