CFSetCallBacks |
Header: CFSet.h |
This structure contains the callbacks used to retain, release, describe, and compare the values of a CFSet object.
struct CFSetCallBacks { CFIndex version; CFSetRetainCallBack retain; CFSetReleaseCallBack release; CFSetCopyDescriptionCallBack copyDescription; CFSetEqualCallBack equal; CFSetHashCallBack hash; };
A version number for the structure type that is passed in to the CFSet creation and copy functions. Currently the version is zero.
A pointer to the callback invoked to retain each value added to the collection. It returns the value that is put in the collection, which is usually the value passed in but can be a different value if that is necessary. The CFSet object's allocator is passed to this function in the first parameter. If you assign NULL to this structure member, the CFSet object does nothing to retain values added to it.
A pointer to the callback function invoked to release a value previously added to the CFSet object. This callback essentially reverses the effects of the retain callback. The CFSet object's allocator is passed to this function in the first parameter. If you assign NULL to this structure, the CFSet object does nothing to values when they are removed from the set or when the CFSet object is destroyed.
A pointer to the callback invoked to create a string representation describing the CFSet and its contents. This callback is invoked by the Base Services CFCopyDescription function. If you assign NULL to this structure member, CFSet creates a simple description for the value.
A pointer to the callback used to compare a value in the dictionary with an external value. This callback is invoked by some routines to determine equality. If you assign NULL to this structure member, CFSet uses pointer equality as the basis of comparison.
A pointer to a callback used by the CFSet object to compute a hash code for its values. If you assign NULL to this structure member, CFSet computes a hash code by converting the pointer value to an integer.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)