Legacy Hash Table Implementation

No overview available.

Topics

Functions

func NSAllHashTableObjects(NSHashTable<AnyObject>) -> [Any]

Returns all of the elements in the specified hash table.

func NSCompareHashTables(NSHashTable<AnyObject>, NSHashTable<AnyObject>) -> Bool

Returns a Boolean value that indicates whether the elements of two hash tables are equal.

func NSCountHashTable(NSHashTable<AnyObject>) -> Int

Returns the number of elements in a hash table.

func NSEnumerateHashTable(NSHashTable<AnyObject>) -> NSHashEnumerator

Creates an enumerator for the specified hash table.

func NSFreeHashTable(NSHashTable<AnyObject>)

Deletes the specified hash table.

func NSHashInsert(NSHashTable<AnyObject>, UnsafeRawPointer?)

Adds an element to the specified hash table.

func NSHashInsertIfAbsent(NSHashTable<AnyObject>, UnsafeRawPointer?) -> UnsafeMutableRawPointer?

Adds an element to the specified hash table only if the table does not already contain the element.

func NSHashRemove(NSHashTable<AnyObject>, UnsafeRawPointer?)

Removes an element from the specified hash table.

func NSResetHashTable(NSHashTable<AnyObject>)

Deletes the elements of the specified hash table.

func NSStringFromHashTable(NSHashTable<AnyObject>) -> String

Returns a string describing the hash table’s contents.

Data Types

struct NSHashEnumerator

Allows successive elements of a hash table to be returned each time this structure is passed to NSNextHashEnumeratorItem(_:).

struct NSHashTableCallBacks

Defines a structure that contains the function pointers used to configure behavior of NSHashTable with respect to elements within a hash table.

typealias NSHashTableOptions

Components in a bit-field to specify the behavior of elements in an NSHashTable object.

Constants

let NSIntegerHashCallBacks: NSHashTableCallBacks

For sets of NSInteger-sized quantities or smaller (for example, int, long, or unichar).

let NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks

For sets of pointers, hashed by address.

let NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks

For sets of objects, but without retaining/releasing.

let NSObjectHashCallBacks: NSHashTableCallBacks

For sets of objects (similar to NSSet).

let NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks

For sets of objects, with transfer of ownership upon insertion, using pointer equality.

let NSOwnedPointerHashCallBacks: NSHashTableCallBacks

For sets of pointers, with transfer of ownership upon insertion.

let NSPointerToStructHashCallBacks: NSHashTableCallBacks

For sets of pointers to structs, when the first field of the struct is int-sized.