OFDictionary Class Reference

#import <OFDictionary.h>

Inheritance diagram for OFDictionary:
OFObject <OFCopying> <OFMutableCopying> <OFFastEnumeration> OFMutableDictionary

List of all members.

Public Member Functions

(id) - init
(id) - initWithDictionary:
(id) - initWithObject:forKey:
(id) - initWithObjects:forKeys:
(id) - initWithKeysAndObjects:
(id) - initWithKey:argList:
(id) - objectForKey:
(size_t) - count
(OFEnumerator *) - objectEnumerator
(OFEnumerator *) - keyEnumerator

Static Public Member Functions

(id) + dictionary
(id) + dictionaryWithDictionary:
(id) + dictionaryWithObject:forKey:
(id) + dictionaryWithObjects:forKeys:
(id) + dictionaryWithKeysAndObjects:

Protected Attributes

struct of_dictionary_bucketdata
size_t size
size_t count

Detailed Description

The OFDictionary class is a class for using hash tables.


Member Function Documentation

- (size_t) count  
Returns:
The number of objects in the dictionary
+ (id) dictionary  

Creates a new OFDictionary.

Returns:
A new autoreleased OFDictionary
+ (id) dictionaryWithDictionary: (OFDictionary*)  dict  

Creates a new OFDictionary with the specified dictionary.

Parameters:
dict An OFDictionary
Returns:
A new autoreleased OFDictionary
+ (id) dictionaryWithKeysAndObjects: (OFObject <OFCopying>*)  key
,   ... 

Creates a new OFDictionary with the specified keys objects.

Parameters:
key The first key
Returns:
A new autoreleased OFDictionary
+ (id) dictionaryWithObject: (OFObject*)  obj
forKey: (OFObject <OFCopying>*)  key 

Creates a new OFDictionary with the specified key and object.

Parameters:
key The key
obj The object
Returns:
A new autoreleased OFDictionary
+ (id) dictionaryWithObjects: (OFArray*)  objs
forKeys: (OFArray*)  keys 

Creates a new OFDictionary with the specified keys and objects.

Parameters:
keys An array of keys
objs An array of objects
Returns:
A new autoreleased OFDictionary
- (id) init  

Initializes an already allocated OFDictionary.

Returns:
An initialized OFDictionary

Reimplemented from OFObject.

- (id) initWithDictionary: (OFDictionary*)  dict  

Initializes an already allocated OFDictionary with the specified OFDictionary.

Parameters:
dict An OFDictionary
Returns:
An initialized OFDictionary
- (id) initWithKey: (OFObject <OFCopying>*)  first
argList: (va_list)  args 

Initializes an already allocated OFDictionary with the specified key and va_list.

Parameters:
first The first key
args A va_list of the other arguments
Returns:
A new initialized OFDictionary
- (id) initWithKeysAndObjects: (OFObject <OFCopying>*)  first
,   ... 

Initializes an already allocated OFDictionary with the specified keys and objects.

Parameters:
first The first key
Returns:
A new initialized OFDictionary
- (id) initWithObject: (OFObject*)  obj
forKey: (OFObject <OFCopying>*)  key 

Initializes an already allocated OFDictionary with the specified key and object.

Parameters:
key The key
obj The object
Returns:
A new initialized OFDictionary
- (id) initWithObjects: (OFArray*)  objs
forKeys: (OFArray*)  keys 

Initializes an already allocated OFDictionary with the specified keys and objects.

Parameters:
keys An array of keys
objs An array of objects
Returns:
A new initialized OFDictionary
- (OFEnumerator *) keyEnumerator  
Returns:
An OFEnumerator to enumerate through the dictionary's keys
- (OFEnumerator *) objectEnumerator  
Returns:
An OFEnumerator to enumerate through the dictionary's objects
- (id) objectForKey: (OFObject <OFCopying>*)  key  
Parameters:
key The key whose object should be returned
Returns:
The object for the given key or nil if the key was not found

The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on Mon Feb 1 19:19:40 2010 for ObjFW by  doxygen 1.6.1