Function CDM_RemoveSpan


Definition:#include <CDM.h>
Prototype:CDM_Annotation CDM_RemoveSpan(CDM_Annotation Annotation, long start, long end);
Arguments:

Ann: An Annotation object. (CDM_Annotation)
start: The start byte offset of the Span to be deleted. (long)
end: The end byte offset of the Span to be deleted. (long)

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

Description:

This function will remove the Span having as start and end offsets the values specified through the "start" and "end" parameters from the specified Annotation, if such a Span object exists. The returned value of this function will always be a new Annotation object if a proper Span object was found and removed. If a Span object with the proper start and end offsets was not found, the same Annotation object as the provided one will be returned. Finally, in the case of an error NULL will be returned and an error will be left at the current active Tcl interpreter (CDM_Interp).

Return Value:

This function returns a new Annotation object (of type CDM_Annotation) if a Span object with the same offsets as the provided ones is found and removed from the provided Annotation. In the case that a proper Span object is not found, the provided Annotation object (specified through the "Annotation" parameter) is returned. Finally, in the case of an error NULL will be returned and an error will be left at the current active Tcl interpreter (CDM_Interp).

Note that the returned Annotation object (if not NULL and not the same as the original Annotation object) is not property of CDM and the caller is responsible to free this object when it is no longer needed by either calling Tcl_DecrRefCount or CDM_Free.

Notes:

This function is equivelant to tip_RemoveSpan (Tcl API).

See Also:

Tcl_DecrRefCount, tip_RemoveSpan


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