Public Methods | |
AnnotationIndex () | |
A constructor. Create an AnnotationIndex with an empty set of indexes. | |
~AnnotationIndex () | |
A destructor. | |
void | add (Annotation *a) |
add an annotation to the indexes | |
void | deleteAnnotation (Annotation *a) |
delete an annotation from the indexes | |
void | addFeature (Annotation *a, const String &feature, const String &value) |
add a feature to the indexes | |
void | deleteFeature (Annotation *a, const String &feature) |
delete a feature from the indexes | |
AnnotationSet | getByOffset (Offset offset) |
Annotation * | getAnnotationByOffset (Offset offset, const AnnotationType &type="") |
bool | existsAnnotation (const Id &id) |
Test if the specified annotation exists. | |
bool | existsAnchor (const Id &id) |
Test if the specified anchor exists. | |
Offset | getNearestOffset (Offset o) |
get the nearest used offset to the specified offset |
|
Get one of the annotations which overlap a particular time offset. Same as getByOffset except that getAnnotationByOffset returns only one qualified annotation while getByOffset returns all of them. getAnnotationByOffset is signaficantly faster than getByOffset. Should be favored over getByOffset whenever possible.
|
|
Get the annotations that overlap a particular time offset. Get all annotations whose start anchor offset is smaller than or equal to the given offset AND end anchor offset is greater than or equal to the given offet. |
![]() |