Up

# NSMapTable class reference

### Authors

Richard Frith-Macdonald (`rfm@gnu.org`)

Version: 32077

Date: 2011-02-11 07:51:47 -0700 (Fri, 11 Feb 2011)

Copyright: (C) 2009 Free Software Foundation, Inc.

# Software documentation for the NSMapTable class

## NSMapTable : NSObject

> Declared in:
>   Foundation/NSMapTable.h

> Conforms to:
>   NSCopying
>   NSCoding
>   NSFastEnumeration

Availability: OpenStep
Description forthcoming.
Method summary

- +mapTableWithKeyOptions:valueOptions:
- +mapTableWithStrongToStrongObjects
- +mapTableWithStrongToWeakObjects
- +mapTableWithWeakToStrongObjects
- +mapTableWithWeakToWeakObjects
- -count
- -dictionaryRepresentation
- -initWithKeyOptions:valueOptions:capacity:
- -initWithKeyPointerFunctions:valuePointerFunctions:capacity:
- -keyEnumerator
- -keyPointerFunctions
- -objectEnumerator
- -objectForKey:
- -removeAllObjects
- -removeObjectForKey:
- -setObject:forKey:
- -valuePointerFunctions

### mapTableWithKeyOptions: valueOptions:

+ (id) mapTableWithKeyOptions: (NSPointerFunctionsOptions)keyOptions valueOptions: (NSPointerFunctionsOptions)valueOptions;
Availability: OpenStep
Return a map table initialised using the specified options for keys and values.

### mapTableWithStrongToStrongObjects

+ (id) mapTableWithStrongToStrongObjects;
Availability: OpenStep
Convenience method for creating a map table to store object values using object keys.

### mapTableWithStrongToWeakObjects

+ (id) mapTableWithStrongToWeakObjects;
Availability: OpenStep
Convenience method for creating a map table to store non-retained object values with retained object keys.

### mapTableWithWeakToStrongObjects

+ (id) mapTableWithWeakToStrongObjects;
Availability: OpenStep
Convenience method for creating a map table to store retained object values with non-retained object keys.

### mapTableWithWeakToWeakObjects

+ (id) mapTableWithWeakToWeakObjects;
Availability: OpenStep
Convenience method for creating a map table to store non-retained object values with non-retained object keys.

### count

- (NSUInteger) count;
Availability: OpenStep
Return the number of items stored in the map.

### dictionaryRepresentation

- (NSDictionary*) dictionaryRepresentation;
Availability: OpenStep
Return a dictionary containing the keys and values in the receiver.

### initWithKeyOptions: valueOptions: capacity:

- (id) initWithKeyOptions: (NSPointerFunctionsOptions)keyOptions valueOptions: (NSPointerFunctionsOptions)valueOptions capacity: (NSUInteger)initialCapacity;
Availability: OpenStep
Initialiser using option bitmasks to describe the keys and values.

### initWithKeyPointerFunctions: valuePointerFunctions: capacity:

- (id) initWithKeyPointerFunctions: (NSPointerFunctions*)keyFunctions valuePointerFunctions: (NSPointerFunctions*)valueFunctions capacity: (NSUInteger)initialCapacity;
Availability: OpenStep
Initialiser using full pointer function information to describe the keys and values.

### keyEnumerator

- (NSEnumerator*) keyEnumerator;
Availability: OpenStep
Return an enumerator able to enumerate the keys in the receiver.

### keyPointerFunctions

- (NSPointerFunctions*) keyPointerFunctions;
Availability: OpenStep
Return an NSPointerFunctions value describind the functions used by the receiver to handle keys.

### objectEnumerator

- (NSEnumerator*) objectEnumerator;
Availability: OpenStep
Return an enumerator able to enumerate the values in the receiver.

### objectForKey:

- (id) objectForKey: (id)aKey;
Availability: OpenStep
Return the object stored under the specified key.

### removeAllObjects

- (void) removeAllObjects;
Availability: OpenStep
Empty the receiver of all stored values.

### removeObjectForKey:

- (void) removeObjectForKey: (id)aKey;
Availability: OpenStep
Remove the object stored under the specified key.

### setObject: forKey:

- (void) setObject: (id)anObject forKey: (id)aKey;
Availability: OpenStep
Store the object under the specified key, replacing any object which was previously stored under that key.

### valuePointerFunctions

- (NSPointerFunctions*) valuePointerFunctions;
Availability: OpenStep
Return an NSPointerFunctions value describind the functions used by the receiver to handle values.

Up