Differences From Artifact [72e24e9365]:
- File
src/OFDictionary.h
— part of check-in
[a0fd103a0b]
at
2021-03-07 02:36:04
on branch trunk
— Style change: Allow more than 1 argument per line
This is only migrating some places, others will be migrated as they are
touched. (user: js, size: 9238) [annotate] [blame] [check-ins using] [more...]
To Artifact [a266eaef28]:
- File src/OFDictionary.h — part of check-in [c4e0e56fa3] at 2021-04-17 03:21:14 on branch new-naming-convention — Rename all blocks (user: js, size: 9201) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
30 31 32 33 34 35 36 | #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); #ifdef OF_HAVE_BLOCKS | | < | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #import "OFMessagePackRepresentation.h" OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); #ifdef OF_HAVE_BLOCKS typedef void (^OFDictionaryEnumerationBlock)(id key, id object, bool *stop); typedef bool (^OFDictionaryFilterBlock)(id key, id object); typedef id _Nonnull (^OFDictionaryMapBlock)(id key, id object); #endif /** * @class OFDictionary OFDictionary.h ObjFW/OFDictionary.h * * @brief An abstract class for storing objects in a dictionary. * |
︙ | ︙ | |||
268 269 270 271 272 273 274 | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each key / object pair. * * @param block The block to execute for each key / object pair. */ | | < | | | | | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each key / object pair. * * @param block The block to execute for each key / object pair. */ - (void)enumerateKeysAndObjectsUsingBlock: (OFDictionaryEnumerationBlock)block; /** * @brief Creates a new dictionary, mapping each object using the specified * block. * * @param block A block which maps an object for each object * @return A new autoreleased OFDictionary */ - (OFDictionary OF_GENERIC(KeyType, id) *) mappedDictionaryUsingBlock: (OFDictionaryMapBlock)block; /** * @brief Creates a new dictionary, only containing the objects for which the * block returns true. * * @param block A block which determines if the object should be in the new * dictionary * @return A new autoreleased OFDictionary */ - (OFDictionary OF_GENERIC(KeyType, ObjectType) *) filteredDictionaryUsingBlock: (OFDictionaryFilterBlock)block; #endif #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef KeyType # undef ObjectType #endif @end |
︙ | ︙ |