CFSetAddValue

Header: CFSet.h Carbon status: Supported

Adds a value to a mutable CFSet object.

void CFSetAddValue (
    CFMutableSetRef theSet, 
    const void *value
);
Parameter descriptions
theSet

Pass a reference to a mutable CFSet object whose contents you want to modify.

value

Pass a pointer to the value that you wish to add to the collection. You may pass the value itself instead of a pointer to it if it is pointer-size or less. If the CFSet object is fixed-size and the value is greater than its capacity, the behavior is undefined.

DISCUSSION

The CFSetAddValue function is where the difference between sets and bags is primarily located. When you add a value to a bag with the CFBagAddValue function, the value is added even if the value already exists in the collection. However, if you try to add a value to a set (with the CFSetAddValue function) and that value already exists in the set, the function returns without doing anything.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)