will create a new object of the class Phones with the given name. If this was successful the return value will be a pointer to the just created object. If it was not successful, a null pointer is returned. The useN counter will be set to 0, so it's the calling functions responsibility to increase that value.
The phonesCreate function will also call the phonesInit function, so there's no need to do that yourself after creating an object. This function is also called automatically from the generic list module, whenever a new object is added to a list. The return value is always TCL_OK.
will release the memory that is used for the given object. The object itself will not be destroyed. This function will refuse to work when the given object is still in use by one or more other functions. Make sure to decrement the useN counter (call the unlink() function of the itf module), before deinitializing an object. The return value is TCL_OK on success and TCL_ERROR if the object could not be deinitialized.
returns the number of super-objects that are using the given Phones object.
will deinitialize the given Phones object, and after that release the object's memory. The object will not exist any more after this operation. The return value is TCL_OK on success and TCL_ERROR if the object could not be freed.
This is the implementation of the index method. It works for one monophone name at a time. The return value is the desired index or -1 if the named monophone does not exist in the given object.
This is the implementation of the name method. It works for one index at a time. The return value is the name of the indexed monophone or (null) of the index is out of bounds.
This function returns the number of monophones that are in the given Phones object. It is not accessible from Tcl. It is usefull for other function which want to allocate memory for all monophones. Here's form where they know how many monophones there are.
This is the implementation of the add method. It works for any number (= argc) of monophones in the argv, array. The return value is always TCL_OK (as of Oct. 13, 1995).
This is the implementation of the delete method. It works for any number (= argc) of monophones in the argv, array. The return value is TCL_OK if all named monophones were deleted and TCL_ERROR otherwise.
This is the implementation of the write method. This function will write a comment header and will call the static void phonesWriteFile() function for actually writing the monophone names. The phonesWriteFile() function is also used by phoneSetWrite() for writing every of its subbjects. The return value is TCL_OK of the file was successfully written, and TCL_ERROR otherwise.
This is the implementation of the read method. The return value is the number of successfully read monophones. This is not the number by which the size of the object was incresed, because if a monophone occurs more than once in the file or if it already exists in the object, it will be counted but not added. The return value will be -1 if a problem occurred during reading.
will create a new object of the class PhonesSet with the given name. If this was successful the return value will be a pointer to the just created object. If it was not successful, a null pointer is returned. The useN counter will be set to 0, so it's the calling functions responsibility to increase that value.
The phonesCreate function will also call the phonesInit function, so there's no need to do that yourself after creating an object. The return value is always TCL_OK.
will release the memory that is used for the given object and its subobjects. The object itself will not be destroyed. This function will refuse to work when the given object or one of its subobjects is still in use by one or more other functions. Make sure to decrement the useN counter (call the unlink() function of the itf module), before deinitializing an object. The return value is TCL_OK on success and TCL_ERROR if the object could not be deinitialized.
returns the number of super-objects that are using the given PhonesSet object.
will deinitialize the given PhonesSet object, and after that release the object's memory. The object will not exist any more after this operation. The return value is TCL_OK on success and TCL_ERROR if the object could not be freed.
This is the implementation of the index method. It works for one Phones name at a time. The return value is the desired index or -1 if the named Phones does not exist in the given object.
This is the implementation of the name method. It works for one index at a time. The return value is the name of the indexed Phones object or (null) of the index is out of bounds.
This function returns the number of Phones objects that are in the given PhonesSet object. It is not accessible from Tcl. It is usefull for other function which want to allocate memory for all monophone sets. Here's form where they know how many sets there are.
This is the implementation of the add method. It works for any number (= argc) of Phones objects in the argv, array. The return value is always TCL_OK (as of Oct. 13, 1995).
This is the implementation of the delete method. It works for any number (= argc) of Phones objects in the argv, array. The return value is TCL_OK if all named monophones were deleted and TCL_ERROR otherwise.
This is the implementation of the write method. This function will write a comment header and will call the static void phonesWriteFile() function for writing each of its subobjects. The return value is TCL_OK of the file was successfully written, and TCL_ERROR otherwise.
This is the implementation of the read method. The return value is the number of successfully read Phones objects. This is not the number by which the size of the PhonesSet object was incresed, because if a Phones object occurs more than once in the file or if it already exists in the PhonesSet object, it will be counted but not added. The return value will be -1 if a problem occurred during reading.