Function CDM_SetName


Definition:#include <CDM.h>
Prototype:char * CDM_SetName(CDM_Collection Collection, char *Name);
Arguments:

Collection: A Collection object. (CDM_Collection)
Name: The desired new Name of the Collection. (char *)

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

Description:

This function will change the Name of the specified Collection. The Name of the Collection represents the (absolute) path of the Collection's disk representation. Changing the Name of a Collection will result into a new Collection representation in disk if the Collection is saved (through CDM_Sync). Note that this function will not perform any checks on the value of the "Name" parameter. If an invalid path is given, or a path that corresponds to an existing file, no error will be returned by this function. (Although CDM_Sync will return an error if the caller tries to save a Collection with an invalid Name.)

The value of the "Name" parameter will not modified in any way by CDM, as a local copy will be created and modified internally by the CDM.

Return Value:

This function will return a pointer (of type char*) to the string buffer that holds the new Collection Name. This pointer will be at a different memory location than the given parameter value, as the CDM will create and manipulate a local copy.

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 pointer is property of the CDM and should never be freed or modified in any way by the caller.

Notes:

This function is equivelant to tip_SetName (Tcl API).

See Also:

CDM_Sync, tip_SetName


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