Function CDM_CreateSpan


Definition:#include <CDM.h>
Prototype:CDM_Span CDM_CreateSpan(long start, long end);
Arguments:

start: Span Start (long)
end: Span End (long)

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

Description:

This function will create and return a Span object (of type CDM_Span). In order to reduce memory requirements, this function will try to locate if a Span with exactly the same characteristics (same start and end values) already exists. In such a case, this (possibly shared) Span object will be returned. Else, a new Span object will be created and returned.

In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (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.

Return Value:

This function will return a Span object (of type of CDM_Span). This object may be an old, already in use (shared) object or a newly created object, according to the specified parameters.

In case of an error, NULL will be returned and an error message describing the error will be left at the current Tcl interpreter (CDM_Interp).

Note that the returned object is not property of the CDM: the caller is responsible for using Tcl_IncrRefCount in order to keep a reference to the object or Tcl_DecrRefCount - 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_CreateSpan (Tcl API).

See Also:

CDM_CreateSpanSet, CDM_Free, Tcl_DecrRefCount, Tcl_IncrRefCount, tip_CreateSpan


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