Function tip_CompareAnnotations


Prototype: tip_CompareAnnotations(Annotation);
Arguments:

Ann1: The first Annotation (CDM_Annotation)
Ann2: The second Annotation (CDM_Annotation)

C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

This function will compare two Annotations, Ann1 and Ann2, according to their Span sets.

Return Value:

This function returns -1 if Ann1 is lower than Ann2, i.e. Ann1 spans a text range that starts earlier than all the text ranges spanned by the Ann2 Annotation. If the two Annotations span the same text ranges, zero is returned. Finally, 1 is returned if Ann1 is greater than Ann2, i.e. when Ann2 spans a text range starts earlier than all the text ranges spanned by the Ann1 Annotation. In case of an error, a value equal or greater than 10 will be returned and an error message will be left at the current Tcl interpreter.

Notes:

This function is equivelant to CDM_AddAnnotation (C++ API).

A common use of this function is to be used with lsort, in order to sort an Annotation set, in the same way tip_SelectAnnotationsSorted would have done:

lsort -command tip_CompareAnnotations $AnnotationSet

See Also:

tip_SelectAnnotationsSorted, CDM_CompareAnnotations, lsort


Generated by: petasis@aias on Wed Aug 16 10:31:45 PM EEST 2006.