Differences From Artifact [f1914c42af]:
- File src/OFEnumerator.h — part of check-in [5a31a537a1] at 2017-02-04 17:45:33 on branch trunk — Fix typos in comments and strings found by aspell (user: js, size: 3661) [annotate] [blame] [check-ins using]
To Artifact [e2784c6244]:
- File
src/OFEnumerator.h
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 3663) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
31 32 33 34 35 36 37 | @protocol OFEnumerating /*! * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * * @returns An OFEnumerator to enumerate through all objects of the collection */ | | | | | 31 32 33 34 35 36 37 38 39 40 41 42 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 69 70 71 72 73 | @protocol OFEnumerating /*! * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * * @returns An OFEnumerator to enumerate through all objects of the collection */ - (OFEnumerator *)objectEnumerator; @end /*! * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A class which provides methods to enumerate through collections. */ #ifdef OF_HAVE_GENERICS @interface OFEnumerator<ObjectType>: OFObject #else # ifndef DOXYGEN # define ObjectType id # endif @interface OFEnumerator: OFObject #endif /*! * @brief Returns the next object or `nil` if there is none left. * * @return The next object or `nil` if there is none left */ - (nullable ObjectType)nextObject; /*! * @brief Returns an array of all remaining objects in the collection. * * @return An array of all remaining objects in the collection */ - (OFArray OF_GENERIC(ObjectType) *)allObjects; /*! * @brief Resets the enumerator, so the next call to nextObject returns the * first object again. */ - (void)reset; @end |
︙ | ︙ | |||
115 116 117 118 119 120 121 | * * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. */ | | | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | * * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. */ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; @end OF_ASSUME_NONNULL_END |