00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <stdarg.h>
00013
00014 #import "OFObject.h"
00015 #import "OFArray.h"
00016
00017 struct of_dictionary_bucket
00018 {
00019 OFObject <OFCopying> *key;
00020 OFObject *object;
00021 uint32_t hash;
00022 };
00023
00027 @interface OFDictionary: OFObject <OFCopying, OFMutableCopying>
00028 {
00029 struct of_dictionary_bucket *data;
00030 size_t size;
00031 size_t count;
00032 }
00033
00039 + dictionary;
00040
00047 + dictionaryWithDictionary: (OFDictionary*)dict;
00048
00056 + dictionaryWithObject: (OFObject*)obj
00057 forKey: (OFObject <OFCopying>*)key;
00058
00066 + dictionaryWithObjects: (OFArray*)objs
00067 forKeys: (OFArray*)keys;
00068
00075 + dictionaryWithKeysAndObjects: (OFObject <OFCopying>*)key, ...;
00076
00082 - init;
00083
00091 - initWithDictionary: (OFDictionary*)dict;
00092
00101 - initWithObject: (OFObject*)obj
00102 forKey: (OFObject <OFCopying>*)key;
00103
00112 - initWithObjects: (OFArray*)objs
00113 forKeys: (OFArray*)keys;
00114
00122 - initWithKeysAndObjects: (OFObject <OFCopying>*)first, ...;
00123
00132 - initWithKey: (OFObject <OFCopying>*)first
00133 argList: (va_list)args;
00134
00139 - (id)objectForKey: (OFObject <OFCopying>*)key;
00140
00144 - (size_t)count;
00145
00146 - setObject: (OFObject*)obj
00147 forKey: (OFObject <OFCopying>*)key;
00148 - removeObjectForKey: (OFObject*)key;
00149 @end
00150
00151 #import "OFIterator.h"
00152 #import "OFMutableDictionary.h"