Function

CFBagGetCountOfValue

Returns the number of times a value occurs in a bag.

Declaration

CFIndex CFBagGetCountOfValue(CFBagRef theBag, const void *value);

Parameters

theBag

The bag to examine.

value

The value for which to find matches in theBag. The equal callback provided when theBag was created is used to compare. If the equal callback was NULL, pointer equality (in C, ==) is used. If value, or any other value in theBag, is not understood by the equal callback, the behavior is undefined.

Return Value

The number of times value occurs in theBag.

See Also

Examining a Bag

CFBagContainsValue

Reports whether or not a value is in a bag.

CFBagGetCount

Returns the number of values currently in a bag.

CFBagGetValue

Returns a requested value from a bag.

CFBagGetValueIfPresent

Reports whether or not a value is in a bag, and returns that value indirectly if it exists.

CFBagGetValues

Fills a buffer with values from a bag.