Differences From Artifact [fb1ecf6b18]:
- File
src/OFEnumerator.h
— part of check-in
[7214a2c7af]
at
2019-06-19 00:45:05
on branch trunk
— OFEnumerator: Remove -[reset]
It's not very useful and is a problem for the Foundation bridge, as
NSEnumerator does not have it. (user: js, size: 3535) [annotate] [blame] [check-ins using]
To Artifact [5d33d7fcc0]:
- File src/OFEnumerator.h — part of check-in [f18b5db636] at 2019-06-19 00:54:33 on branch trunk — OFEnumerator: Conform to OFFastEnumeration (user: js, size: 3555) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 | * collection. * * @return An OFEnumerator to enumerate through all objects of the collection */ - (OFEnumerator *)objectEnumerator; @end | < < < < < < < < < < < < < < < < < < < < < < < < < < < | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | * collection. * * @return An OFEnumerator to enumerate through all objects of the collection */ - (OFEnumerator *)objectEnumerator; @end /* * This needs to be exactly like this because it's hard-coded in the compiler. * * We need this bad check to see if we already imported Cocoa, which defines * this as well. */ /*! |
︙ | ︙ | |||
110 111 112 113 114 115 116 117 | */ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; @end OF_ASSUME_NONNULL_END | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | */ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; @end /*! * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A class which provides methods to enumerate through collections. */ @interface OFEnumerator OF_GENERIC(ObjectType): OFObject <OFFastEnumeration> #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # define ObjectType id #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; #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end OF_ASSUME_NONNULL_END |