18 #import "OFEnumerator.h"
20 OF_ASSUME_NONNULL_BEGIN
31 void *OF_NONNULL (*OF_NULLABLE retain)(
void *value);
33 void (*OF_NULLABLE release)(
void *value);
35 uint32_t (*OF_NULLABLE hash)(
void *value);
37 bool (*OF_NULLABLE equal)(
void *value1,
void *value2);
60 void *key,
void *value);
74 struct of_map_table_bucket **_buckets;
75 uint32_t _count, _capacity;
77 unsigned long _mutations;
104 capacity: (
size_t)capacity;
129 capacity: (
size_t)capacity;
144 - (nullable void*)valueForKey: (
void*)key;
152 - (void)setValue: (
void*)value
160 - (void)removeValueForKey: (
void*)key;
165 - (void)removeAllValues;
174 - (bool)containsValue: (nullable
void*)value;
184 - (bool)containsValueIdenticalTo: (nullable
void*)value;
202 #ifdef OF_HAVE_BLOCKS
208 - (void)enumerateKeysAndValuesUsingBlock:
243 struct of_map_table_bucket **_buckets;
245 unsigned long _mutations;
246 unsigned long *_mutationsPtr;
264 OF_ASSUME_NONNULL_END
A struct describing the functions to be used by the map table.
Definition: OFMapTable.h:29
A protocol for fast enumeration.
Definition: OFEnumerator.h:111
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
A class which provides methods to enumerate through an OFMapTable's keys or values.
Definition: OFMapTable.h:241
A class similar to OFDictionary, but providing more options how keys and values should be retained...
Definition: OFMapTable.h:71
A protocol for the creation of copies.
Definition: OFObject.h:896
void(^ of_map_table_enumeration_block_t)(void *key, void *value, bool *stop)
A block for enumerating an OFMapTable.
Definition: OFMapTable.h:49
void *OF_NONNULL(^ of_map_table_replace_block_t)(void *key, void *value)
A block for replacing values in an OFMapTable.
Definition: OFMapTable.h:59