Important: The information in this document is obsolete and should not be used for new development.
OTFindLink
Finds a link in a FIFO list and returns a pointer to it.C INTERFACE
OTLink* OTFindLink (OTList* list, OTListSearchProcPtr proc, const void* refPtr)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
list- A pointer to the FIFO list to be searched.
proc- A pointer to the user-defined procedure to be used in searching for the link. See
MyListSearchFunctionfor information on defining your own list search function.refPtr- A pointer to a value that is passed to the user-defined search procedure and that is useful to that procedure in finding a link. This value might be the address of a field, the value of a field, or any other kind of data that would help identify the link being sought.
- function result
- A pointer to the link being sought. The value of this pointer is
NULLif no link matching your search criteria is found.DISCUSSION
This function walks the list (from head to tail) specified by thelistparameter, repeatedly calling the search procedure specified by theprocparameter. Each time it calls the search procedure, it passes it the value specified in therefPtrparameter. TheOTFindLinkfunction returns a pointer to the firstOTLinkvalue for the yourprocprocedure returnedtrue. ANULLis returned if yourprocprocedure never returnedtrue.Use the
OTIsInListfunction to determine whether a link is in a FIFO list.Use the
OTRemoveLinkfunction to remove a link from a FIFO list.Use the
OTFindAndRemoveLinkfunction to find and remove a link in a FIFO list.Use the
OTGetIndexedLinkfunction to find a link in a FIFO list based on its index in the list.