21 #import "OFEnumerator.h" 23 OF_ASSUME_NONNULL_BEGIN
34 void *_Nullable (*_Nullable retain)(
void *_Nullable object);
36 void (*_Nullable release)(
void *_Nullable object);
38 unsigned long (*_Nullable hash)(
void *_Nullable object);
40 bool (*_Nullable equal)(
void *_Nullable object1,
41 void *_Nullable object2);
54 void *_Nullable object,
bool *stop);
64 void *_Nullable object);
75 OF_SUBCLASSING_RESTRICTED
79 struct OFMapTableBucket *_Nonnull *_Nullable _buckets;
80 uint32_t _count, _capacity;
81 unsigned char _rotation;
82 unsigned long _mutations;
98 @property (readonly, nonatomic)
size_t count;
122 capacity: (
size_t)capacity;
124 - (instancetype)init OF_UNAVAILABLE;
149 capacity: (
size_t)capacity
150 OF_DESIGNATED_INITIALIZER;
158 - (nullable
void *)objectForKey: (
void *)key;
166 - (void)setObject: (nullable
void *)object forKey: (nullable
void *)key;
173 - (void)removeObjectForKey: (nullable
void *)key;
178 - (void)removeAllObjects;
187 - (bool)containsObject: (nullable
void *)object;
197 - (bool)containsObjectIdenticalTo: (nullable
void *)object;
215 #ifdef OF_HAVE_BLOCKS 238 #ifndef OF_MAP_TABLE_M 239 OF_SUBCLASSING_RESTRICTED
244 struct OFMapTableBucket *_Nonnull *_Nullable _buckets;
246 unsigned long _mutations, *_Nullable _mutationsPtr, _position;
249 - (instancetype)init OF_UNAVAILABLE;
257 - (
void *_Nullable *_Nullable)nextObject;
260 OF_ASSUME_NONNULL_END
A struct describing the functions to be used by the map table.
Definition: OFMapTable.h:32
A protocol for fast enumeration.
Definition: OFEnumerator.h:79
The root class for all other classes inside ObjFW.
Definition: OFObject.h:690
void *(^ OFMapTableReplaceBlock)(void *key, void *object)
A block for replacing objects in an OFMapTable.
Definition: OFMapTable.h:63
A class which provides methods to enumerate through an OFMapTable's keys or objects.
Definition: OFMapTable.h:242
A class similar to OFDictionary, but providing more options how keys and objects should be retained...
Definition: OFMapTable.h:76
void(^ OFMapTableEnumerationBlock)(void *key, void *object, bool *stop)
A block for enumerating an OFMapTable.
Definition: OFMapTable.h:53
A protocol for the creation of copies.
Definition: OFObject.h:1350