Function tip_GetDocument


Prototype: tip_GetDocument(Collection);
Arguments:

Collection: A Collection object. (CDM_Collection)
Id: The Id of the desired Document. (string)

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

Description:

This function will return the Document object that has the same Id as the value of the "Id" parameter. The value of the "Id" parameter is assumed to be encoded using the UTF-8 encoding (thus enabling the existance of non Latin characters in the value).

Return Value:

This function returns a Document object (of type CDM_Document) that can be used as a reference to all functions that require a Document object as input. This object will be valid until the Collection that holds this Document object is closed (through tip_Close) and the parent Collection removed from memory. If this object is used after its parent Collection has been closed, an undefined behaviour will occur.

If a Document with the requested Id does not exist, or an error occurs, then an error message will prompt.

Note that the returned object is property of the CDM and should never be freed or modified in any way by the caller.

Notes:

This function will make the proper arrangments so as a call to tip_NextDocument (or tip_NextDocument) will return the Document that was created after the one returned by this function.

This function is equivelant to CDM_GetDocument (C++ API).

See Also:

tip_Close, tip_GetByExternalId


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