Function CDM_CreateSpanSet


Definition:#include <CDM.h>
Prototype:CDM_SpanSet CDM_CreateSpanSet(void);
Arguments:

None: (void)


Prototype:CDM_SpanSet CDM_CreateSpanSet(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:

CDM_SpanSet CDM_CreateSpanSet(void):
This function will create and return an empty SpanSet object (of type CDM_SpanSet).

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_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.

CDM_SpanSet CDM_CreateSpanSet(long start, long end):
This function will create and return a new SpanSet object (of type CDM_SpanSet) which will contain a single Span object (of type CDM_Span) with the specified start and end values.

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_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.

Return Value:

CDM_SpanSet CDM_CreateSpanSet(void):
This function will return an empty SpanSet object (of type of CDM_SpanSet).

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.

CDM_SpanSet CDM_CreateSpanSet(long start, long end):
This function will return a new SpanSet object (of type of CDM_SpanSet). This SpanSet object will contain a single Span object, whoose start and end values will be initialised to the provided ones, through the "start" and "end" 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:

CDM_SpanSet CDM_CreateSpanSet(void):
This function is equivelant to tip_CreateSpanSet (Tcl API).

CDM_SpanSet CDM_CreateSpanSet(long start, long end):
This function is equivelant to the following C++ code:

CDM_Span span = CDM_CreateSpan(start, end);
CDM_SpanSet spanSet = CDM_CreateSpanSet();
CDM_AddSpan(spanSet, span);
This function is equivelant to tip_CreateSpanSet (Tcl API).

See Also:

CDM_SpanSet CDM_CreateSpanSet(void):
CDM_CreateSpan, CDM_Free, Tcl_DecrRefCount, Tcl_IncrRefCount, tip_CreateSpanSet

CDM_SpanSet CDM_CreateSpanSet(long start, long end):
CDM_CreateSpan, CDM_Free, Tcl_DecrRefCount, Tcl_IncrRefCount, tip_CreateSpanSet


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