Overview
Comment: | Override -[objectEnumerator] in some classes
Classes using lightweight generics should also use them for the |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f0f38b0f42851f2880daf9e9de4640e4 |
User & Date: | js on 2021-04-07 20:52:00 |
Other Links: | manifest | tags |
Context
2021-04-07
| ||
21:14 | Rename OFCryptoHash -> OFCryptographicHash check-in: 2969086342 user: js tags: trunk | |
20:52 | Override -[objectEnumerator] in some classes check-in: f0f38b0f42 user: js tags: trunk | |
20:39 | Override -[compare:] with a more specific type check-in: 91a4c53bb1 user: js tags: trunk | |
Changes
Modified src/OFArray.h from [134eddeab8] to [702817f9c0].
︙ | ︙ | |||
213 214 215 216 217 218 219 220 221 222 223 224 225 226 | * @param objects A C array of objects * @param count The length of the C array * @return An initialized OFArray */ - (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects count: (size_t)count; /** * @brief Returns the object at the specified index in the array. * * @warning The returned object is *not* retained and autoreleased for * performance reasons! * * @param index The index of the object to return | > > > > > > > | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | * @param objects A C array of objects * @param count The length of the C array * @return An initialized OFArray */ - (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects count: (size_t)count; /** * @brief Returns an OFEnumerator to enumerate through all objects of the array. * * @return An OFEnumerator to enumerate through all objects of the array */ - (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator; /** * @brief Returns the object at the specified index in the array. * * @warning The returned object is *not* retained and autoreleased for * performance reasons! * * @param index The index of the object to return |
︙ | ︙ |
Modified src/OFEnumerator.h from [570c70606c] to [a48f5dd585].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | @class OFArray OF_GENERIC(ObjectType); @class OFEnumerator OF_GENERIC(ObjectType); /** * @protocol OFEnumeration OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A protocol for getting an enumerator for the object. */ @protocol OFEnumeration /** * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * * @return An OFEnumerator to enumerate through all objects of the collection | > > > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | @class OFArray OF_GENERIC(ObjectType); @class OFEnumerator OF_GENERIC(ObjectType); /** * @protocol OFEnumeration OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A protocol for getting an enumerator for the object. * * If the class conforming to OFEnumeration is using lightweight generics, the * only method, @ref objectEnumerator, should be overridden to use lightweight * generics. */ @protocol OFEnumeration /** * @brief Returns an OFEnumerator to enumerate through all objects of the * collection. * * @return An OFEnumerator to enumerate through all objects of the collection |
︙ | ︙ |
Modified src/OFSet.h from [a377c99f36] to [14327ba57e].
︙ | ︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | * @param firstObject The first object for the set * @param arguments A va_list with the other objects * @return An initialized set with the specified object and va_list */ - (instancetype)initWithObject: (ObjectType)firstObject arguments: (va_list)arguments; /** * @brief Returns whether the receiver is a subset of the specified set. * * @return Whether the receiver is a subset of the specified set */ - (bool)isSubsetOfSet: (OFSet OF_GENERIC(ObjectType) *)set; | > > > > > > > | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | * @param firstObject The first object for the set * @param arguments A va_list with the other objects * @return An initialized set with the specified object and va_list */ - (instancetype)initWithObject: (ObjectType)firstObject arguments: (va_list)arguments; /** * @brief Returns an OFEnumerator to enumerate through all objects of the set. * * @return An OFEnumerator to enumerate through all objects of the set */ - (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator; /** * @brief Returns whether the receiver is a subset of the specified set. * * @return Whether the receiver is a subset of the specified set */ - (bool)isSubsetOfSet: (OFSet OF_GENERIC(ObjectType) *)set; |
︙ | ︙ |