CFDictionaryAddValue

Header: CFDictionary.h Carbon status: Supported

Adds the key-value pair to the dictionary if no such key already exists.

void CFDictionaryAddValue (
    CFMutableDictionaryRef dict, 
    const void *key, 
    const void *value
);
Parameter descriptions
dict

The dictionary to which the value is to be added. If this parameter is not a valid mutable CFDictionary, the behavior is undefined. If the dictionary is a fixed-capacity dictionary and it is full before this operation, the behavior is undefined.

key

The key of the value to add to the dictionary. The key is retained by the dictionary using the retain callback provided when the dictionary was created. If the key is not of the sort expected by the retain callback, the behavior is undefined. If a key which matches this key is already present in the dictionary, this function does nothing ("add if absent").

value

The value to add to the dictionary. The value is retained by the dictionary using the retain callback provided when the dictionary was created. If the value is not of the sort expected by the retain callback, the behavior is undefined.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


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