Function CDM_CreateAnnotation
|
|
Definition: | #include <CDM.h> |
---|
|
Prototype: | CDM_Annotation CDM_CreateAnnotation(char *Type, CDM_SpanSet Spans, CDM_AttributeSet Attributes);
|
---|
Arguments: | Type: The Annotation's Type (char *) Spans: A Set of Spans that the Annotation Covers (CDM_SpanSet) Attributes: A Set of Attributes (CDM_AttributeSet)
|
---|
|
|
Prototype: | CDM_Annotation CDM_CreateAnnotation(const char *Type, const long start, const long end, CDM_AttributeSet Attributes);
|
---|
Arguments: | Type: The Annotation's Type (const char *) start: The start character offset to be stored in the only Span object that will be created for the Annotation (long) end: The end character offset to be stored in the only Span object that will be created for the Annotation (long) Attributes: A Set of Attributes (CDM_AttributeSet)
|
---|
|
|
Description:
This function will create and return a new Annotation object. The newly
created Annotation object will have an empty Annotation Id and the
Annotation type, Span set and Annotation set will be set to the values
provided by the caller through the corresponding parameters. This function may or may not use
the provided Span and Attribute set object: this function will internally
increment/decrement the reference count of the provided set
objects. If the reference count of any of the provided set objects
equals 0 (i.e. the Span set object has been created with a call to
CDM_CreateSpanSet or the Attribute set object has been created with
a call to CDM_CreateAttribute), this function may free the object.
As a result, if
the caller wants to ensure that any of the provided set objects is
valid after calling this function, he should increment its reference
count with Tcl_IncrRefCount.
Note that the returned object is not property of the CDM: the caller is
responsible for using
Tcl_DecrRefCount or
CDM_Free to free the object
and the memory associated with it when the object is not needed anymore.
This function will create and return a new Annotation object. The newly
created Annotation object will have an empty Annotation Id and the
Annotation type, Span set and Annotation set will be set to the values
provided by the caller through the corresponding parameters. This function may or may not use
the provided Span and Attribute set object: this function will internally
increment/decrement the reference count of the provided set
objects. If the reference count of any of the provided set objects
equals 0 (i.e. the Span set object has been created with a call to
CDM_CreateSpanSet or the Attribute set object has been created with
a call to CDM_CreateAttribute), this function may free the object.
As a result, if
the caller wants to ensure that any of the provided set objects is
valid after calling this function, he should increment its reference
count with Tcl_IncrRefCount.
Note that the returned object is not property of the CDM: the caller is
responsible for using
Tcl_DecrRefCount or
CDM_Free to free the object
and the memory associated with it when the object is not needed anymore.
Return Value:
This function will create and return a new Annotation object (of type
CDM_Annotation). In case of an error, NULL will be returned and an error
message describing the error will be left at the current active
Tcl interp (CDM_Interp). Note that the returned object is not property of the CDM: the caller is
responsible for using
Tcl_DecrRefCount or
CDM_Free to free the object
and the memory associated with it when the object is not needed anymore.
This function will create and return a new Annotation object (of type
CDM_Annotation). In case of an error, NULL will be returned and an error
message describing the error will be left at the current active
Tcl interp (CDM_Interp). Note that the returned object is not property of the CDM: the caller is
responsible for using
Tcl_DecrRefCount or
CDM_Free to free the object
and the memory associated with it when the object is not needed anymore.
Notes:
This function is equivelant to tip_CreateAnnotation (Tcl API). This function is equivelant to tip_CreateAnnotation (Tcl API).
See Also:
CDM_Free, Tcl_DecrRefCount,
Tcl_IncrRefCount,
tip_CreateAnnotation CDM_Free, Tcl_DecrRefCount,
Tcl_IncrRefCount,
tip_CreateAnnotation
Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.