CFBagGetValueIfPresent(_:_:_:)
Reports whether or not a value is in a bag, and returns that value indirectly if it exists.
Declaration
func CFBagGetValueIfPresent(_ theBag: CFBag!, _ candidate: UnsafeRawPointer!, _ value: UnsafeMutablePointer<UnsafeRawPointer?>!) -> BoolParameters
- theBag:
The bag to be searched.
- candidate:
The value for which to find matches in
theBag. The equal callback provided whentheBagwas created is used to compare. If the equal callback wasNULL, pointer equality (in C, ==) is used. Ifcandidate, or any other value intheBag, is not understood by the equal callback, the behavior is undefined. - value:
A pointer to a value object. Set to the matching value if it exists in the bag, otherwise
NULL. If the value is a Core Foundation object, ownership follows the 20001148 SW1.
Return Value
true if value is present in theBag, otherwise false.
Discussion
Depending on the implementation of the equal callback specified when creating theBag, the value returned in value may not have the same pointer equality as candidate.