Function CDM_RemoveAnnotation


Definition:#include <CDM.h>
Prototype:int CDM_RemoveAnnotation(CDM_Document Document, long Id);
Arguments:

Document: A Document object. (CDM_Document)
Id: The Id of the Annotation to be deleted. (long)


Prototype:CDM_AnnotationSet CDM_RemoveAnnotation(CDM_AnnotationSet Set, long Id);
Arguments:

Set: A set of Annotations. (CDM_AnnotationSet)
Id: The Id of the Annotation to be deleted. (long)

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

Description:

int CDM_RemoveAnnotation(CDM_Document Document, long Id):
This function will remove the Annotation object that has as Id the value specified by the "Id" parameter. If the requested Annotation does not exist, an error will be returned.

CDM_AnnotationSet CDM_RemoveAnnotation(CDM_AnnotationSet Set, long Id):
This function will remove the Annotation object that has as Id the value specified by the "Id" parameter from the provided Annotation set object. This function will construct and return a new Annotation set object containing all Annotations of the original Annotation set object, except the Annotation having as Id the specified by the parameter "Id" value. If the provided Annotation set does not contain an Annotation with the specified Id, then NULL will be returned signing an error.

Note that CDM does not own this object: the caller is responsible to use Tcl_DecrRefCount or CDM_Free in order to free the object and the memory associated with it.

Return Value:

int CDM_RemoveAnnotation(CDM_Document Document, long Id):
The return value from this function will be a standart Tcl completion code (of type int) with one of the values TCL_OK and TCL_ERROR. If the requested Annotation exists and is successfully removed, then TCL_OK will be returned. If the requested Annotation does not exist, or in case of an error, the return value will be TCL_ERROR and an error message describing the error will be left at the current Tcl interpreter (CDM_Interp).

CDM_AnnotationSet CDM_RemoveAnnotation(CDM_AnnotationSet Set, long Id):
This function will create and return an Annotation set object (of type CDM_AnnotationSet), that will contain all the Annotations of the provided by the parameter "Set" Annotation set object, except the Annotation having as Id the specified value of the "Id" parameter. It is an error for the original Annotation set object to not contain an Annotation with Id the specified Id value.

Note that the caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free. In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (CDM_Interp).

Notes:

int CDM_RemoveAnnotation(CDM_Document Document, long Id):
This function is equivelant to tip_RemoveAnnotation (Tcl API).

CDM_AnnotationSet CDM_RemoveAnnotation(CDM_AnnotationSet Set, long Id):
This function is equivelant to tip_RemoveAnnotation (Tcl API).

See Also:

int CDM_RemoveAnnotation(CDM_Document Document, long Id):
tip_RemoveAnnotation

CDM_AnnotationSet CDM_RemoveAnnotation(CDM_AnnotationSet Set, long Id):
CDM_Free, Tcl_DecrRefCount, tip_RemoveAnnotation


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