CFBagCallBacks |
Header: CFBag.h |
This structure contains the callbacks used to retain, release, describe, and compare the values of a CFBag object.
struct CFBagCallBacks { CFIndex version; CFBagRetainCallBack retain; CFBagReleaseCallBack release; CFBagCopyDescriptionCallBack copyDescription; CFBagEqualCallBack equal; CFBagHashCallBack hash; };
A version number for the structure type that is passed in to the CFBag 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 CFBag object's allocator is passed to this function in the first parameter. If you assign NULL to this structure member, the CFBag object does nothing to retain values added to it.
A pointer to the callback function invoked to release a value previously added to the CFBag object. This callback essentially reverses the effects of the retain callback. The CFBag object's allocator is passed to this function in the first parameter. If you assign NULL to this structure, the CFBag object does nothing to values when they are removed from the collection or when the CFBag object is destroyed.
A pointer to the callback invoked to create a string representation describing the CFBag and its contents. This callback is invoked by the Base Services CFCopyDescription function. If you assign NULL to this structure member, CFBag 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, CFBag uses pointer equality as the basis of comparison.
A pointer to a callback used by the CFBag object to compute a hash code for its values. If you assign NULL to this structure member, CFBag computes a hash code by converting the pointer value to an integer.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)