CFType

Overview

All other Core Foundation opaque types derive from CFType. The functions, callbacks, data types, and constants defined for CFType can be used by any derived opaque type. Hence, CFType functions are referred to as “polymorphic functions.” You use CFType functions to retain and release objects, to compare and inspect objects, get descriptions of objects and opaque types, and to get object allocators.

Symbols

Memory Management

func CFGetAllocator(CFTypeRef!)

Returns the allocator used to allocate a Core Foundation object.

func CFGetRetainCount(CFTypeRef!)

Returns the reference count of a Core Foundation object.

Determining Equality

func CFEqual(CFTypeRef!, CFTypeRef!)

Determines whether two Core Foundation objects are considered equal.

Hashing

func CFHash(CFTypeRef!)

Returns a code that can be used to identify an object in a hashing structure.

Miscellaneous Functions

func CFCopyDescription(CFTypeRef!)

Returns a textual description of a Core Foundation object.

func CFCopyTypeIDDescription(CFTypeID)

Returns a textual description of a Core Foundation type, as identified by its type ID, which can be used when debugging.

func CFGetTypeID(CFTypeRef!)

Returns the unique identifier of an opaque type to which a Core Foundation object belongs.

func CFShow(CFTypeRef!)

Prints a description of a Core Foundation object to stderr.

Data Types

CFHashCode

A type for hash codes returned by the CFHash function.

CFTypeID

A type for unique, constant integer values that identify particular Core Foundation opaque types.

CFTypeRef

An untyped "generic" reference to any Core Foundation object.