43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
* @brief A block for enumerating an OFMapTable.
*
* @param key The current key
* @param object The current object
* @param stop A pointer to a variable that can be set to true to stop the
* enumeration
*/
typedef void (^of_map_table_enumeration_block_t)(void *key, void *object,
bool *stop);
/*!
* @brief A block for replacing objects in an OFMapTable.
*
* @param key The key of the object to replace
* @param object The object to replace
* @return The object to replace the object with
*/
typedef void *_Nonnull (^of_map_table_replace_block_t)(void *key, void *object);
#endif
@class OFMapTableEnumerator;
/*!
* @class OFMapTable OFMapTable.h ObjFW/OFMapTable.h
*
|
|
|
|
>
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
* @brief A block for enumerating an OFMapTable.
*
* @param key The current key
* @param object The current object
* @param stop A pointer to a variable that can be set to true to stop the
* enumeration
*/
typedef void (^of_map_table_enumeration_block_t)(void *_Nullable key,
void *_Nullable object, bool *stop);
/*!
* @brief A block for replacing objects in an OFMapTable.
*
* @param key The key of the object to replace
* @param object The object to replace
* @return The object to replace the object with
*/
typedef void *_Nullable (^of_map_table_replace_block_t)(void *_Nullable key,
void *_Nullable object);
#endif
@class OFMapTableEnumerator;
/*!
* @class OFMapTable OFMapTable.h ObjFW/OFMapTable.h
*
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
/*!
* @brief Sets an object for a key.
*
* @param key The key to set
* @param object The object to set the key to
*/
- (void)setObject: (void *)object
forKey: (void *)key;
/*!
* @brief Removes the object for the specified key from the map table.
*
* @param key The key whose object should be removed
*/
- (void)removeObjectForKey: (void *)key;
/*!
* @brief Removes all objects.
*/
- (void)removeAllObjects;
/*!
|
|
|
|
|
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
/*!
* @brief Sets an object for a key.
*
* @param key The key to set
* @param object The object to set the key to
*/
- (void)setObject: (nullable void *)object
forKey: (nullable void *)key;
/*!
* @brief Removes the object for the specified key from the map table.
*
* @param key The key whose object should be removed
*/
- (void)removeObjectForKey: (nullable void *)key;
/*!
* @brief Removes all objects.
*/
- (void)removeAllObjects;
/*!
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
unsigned long *_Nullable _mutationsPtr;
uint32_t _position;
}
- init OF_UNAVAILABLE;
/*!
* @brief Returns the next object.
*
* @return The next object
*/
- (nullable void *)nextObject;
/*!
* @brief Resets the enumerator, so the next call to @ref nextKey returns the
* first key again.
*/
- (void)reset;
@end
OF_ASSUME_NONNULL_END
|
|
>
|
|
|
|
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
unsigned long *_Nullable _mutationsPtr;
uint32_t _position;
}
- init OF_UNAVAILABLE;
/*!
* @brief Returns a pointer to the next object, or NULL if the enumeration
* finished.
*
* @return The next object
*/
- (void *_Nullable *_Nullable)nextObject;
/*!
* @brief Resets the enumerator, so the next call to @ref nextObject returns the
* first object again.
*/
- (void)reset;
@end
OF_ASSUME_NONNULL_END
|