Function CDM_GetFirstAnnotation


Definition:#include <CDM.h>
Prototype:CDM_Annotation CDM_GetFirstAnnotation(CDM_Document Document, char *Type);
Arguments:

Document: A Document object. (CDM_Document)
Type: The type of the desired Annotations. (char *)

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

Description:

This function will start an iteration over the Annotations of the specified type that the specified Document has. This function will return the first Annotation object that has as type the value specified by the "Type" parameter. If the requested Annotation does not exist, an error will be returned. Subsequent calls to CDM_GetNextAnnotation will return the rest of the Annotations of the same type, sorted according to their Id.

Return Value:

This function returns an Annotation object (of type CDM_Annotation) if an Annotation having as type the value of the "Type" parameter is found. In case that the specified Annotation does not exist, NULL will be returned.

Note that the returned object is property of the CDM and should never be freed or directly modified in any way by the caller. Subsequent calls of either the C++ or Tcl API can modify the returned object. If the caller wants to keep a reference to the current state of the returned object, he must place such a request by using Tcl_IncrRefCount. When the caller wants to release the object (and return it to CDM), the functions Tcl_DecrRefCount or CDM_Free must be used.

Notes:

This function is equivelant to tip_GetFirstAnnotation (Tcl API).

See Also:

CDM_GetNextAnnotation, CDM_Free, Tcl_IncrRefCount, Tcl_DecrRefCount, tip_GetFirstAnnotation


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