CFArray Reference

A CFArray and its mutable type, CFMutableArray, are simple, low overhead, ordered containers for objects. More...

## Detailed Description

`#include <CoreFoundation/CFArray.h>`

## Data Structures

struct | CFArrayCallBacks
| Structure with CFArray callbacks. More...

## Typedefs

typedef const struct __CFArray * | CFArrayRef
| Reference to an immutable array object.

## Callbacks

typedef void(* | CFArrayApplierFunction) (const void *value, void *context)
typedef CFStringRef(* | CFArrayCopyDescriptionCallBack) (const void *value)
typedef void(* | CFArrayReleaseCallBack) (CFAllocatorRef allocator, const void *value)
typedef const void *(* | CFArrayRetainCallBack) (CFAllocatorRef allocator, const void *value)
typedef Boolean(* | CFArrayEqualCallBack) (const void *value1, const void *value2)

## Predefined Callback Structures

const CFArrayCallBacks | kCFTypeArrayCallBacks

## Creating an Array

CFArrayRef | CFArrayCreate (CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFArrayCallBacks *callBacks)
CFArrayRef | CFArrayCreateCopy (CFAllocatorRef allocator, CFArrayRef theArray)

## Examining an Array

CFIndex | CFArrayBSearchValues (CFArrayRef theArray, CFRange range, const void *value, CFComparatorFunction comparator, void *context)
Boolean | CFArrayContainsValue (CFArrayRef theArray, CFRange range, const void *value)
CFIndex | CFArrayGetCount (CFArrayRef theArray)
CFIndex | CFArrayGetCountOfValue (CFArrayRef theArray, CFRange range, const void *value)
CFIndex | CFArrayGetFirstIndexOfValue (CFArrayRef theArray, CFRange range, const void *value)
CFIndex | CFArrayGetLastIndexOfValue (CFArrayRef theArray, CFRange range, const void *value)
void | CFArrayGetValues (CFArrayRef theArray, CFRange range, const void **values)
const void * | CFArrayGetValueAtIndex (CFArrayRef theArray, CFIndex idx)

## Applying a Function to Elements

void | CFArrayApplyFunction (CFArrayRef theArray, CFRange range, CFArrayApplierFunction applier, void *context)

## Getting the CFArray Type ID

CFTypeID | CFArrayGetTypeID (void)

## Data Structure Documentation

## _CFArrayCallBacks

struct _CFArrayCallBacks

Data Fields
CFIndex | version | Structure's version number. Current version is 0.
CFArrayRetainCallBack | retain | The callback used to retain values added to the array. If NULL, values are not retained.
CFArrayReleaseCallBack | release |
CFArrayCopyDescriptionCallBack | copyDescription |
CFArrayEqualCallBack | equal |