Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
InputSprocket Functions / Managing Element Lists


ISpElementList_ExtractByLabel

You can use the ISpElementList_ExtractByLabel function to extract and count elements with a specific label in an element list.

OSStatus ISpElementList_ExtractByLabel (
	ISpElementListReference inElementList,
	ISpElementLabel theLabel,
	UInt32 inBufferCount,
	UInt32 *outCount,
	ISpElementReference *buffer);
inElementList
A reference to the element list to count and extract elements from.
theLabel
The label an element must have in order to be counted.
inBufferCount
The number of element references in the array pointed to by the buffer parameter.
outCount
The number of element references with the specified label in the element list.
buffer
A pointer to an array of element references.
function result
A result code.
DESCRIPTION
The ISpElementList_ExtractByLabel function takes, in the buffer parameter, a pointer to an array of element references and, in the inBufferCount parameter, the number of element references in the array. The function copies element references with the label specified by the theLabel parameter from the list specified in the inElementList parameter into that array. If there are more elements of the specified label in the list than there is space in the array, it copies only as many element references as fit. The function returns, in the outCount parameter, the total number of elements with the specified label in the element list.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996