Differences From Artifact [a3a32a9cf7]:
- File
src/OFArray.h
— part of check-in
[3572e824c6]
at
2016-04-23 09:43:04
on branch trunk
— Never end enums with a comma
While this makes moving things around easier, this has been done by
accident and looks ugly. (user: js, size: 14272) [annotate] [blame] [check-ins using]
To Artifact [66a6bc8b55]:
- File
src/OFArray.h
— part of check-in
[05196e511a]
at
2016-06-05 15:00:33
on branch trunk
— Implement Key Value Coding for OFArray
If the key starts with an @, the @ is stripped and the super method is
called. Otherwise, this returns the value for all objects / sets the
value for all objects. (user: js, size: 15207) [annotate] [blame] [check-ins using]
︙ | |||
192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * * @param index The index of the object to return * @return The object at the specified index in the array */ - (ObjectType)objectAtIndex: (size_t)index; - (ObjectType)objectAtIndexedSubscript: (size_t)index; /*! * @brief Returns the value for the specified key * * If the key starts with an `@`, the `@` is stripped and * `[super valueForKey:]` is called. * If the key does not start with an `@`, a new array with the value for the * specified key for each object is returned. * * @note Any nil values are replaced with @ref OFNull! * * @param key The key of the value to return * @return The value for the specified key */ - (nullable id)valueForKey: (OFString*)key; /*! * @brief Set the value for the specified key * * If the key starts with an `@`, the `@` is stripped and * `[super setValue:forKey:]` is called. * If the key does not start with an `@`, @ref setValue:forKey: is called for * each object. * * @note A @ref OFNull value is translated to nil! * * @param value The value for the specified key * @param key The key of the value to set */ - (void)setValue: (nullable id)value forKey: (OFString*)key; /*! * @brief Copies the objects at the specified range to the specified buffer. * * @param buffer The buffer to copy the objects to * @param range The range to copy */ - (void)getObjects: (ObjectType __unsafe_unretained _Nonnull *_Nonnull)buffer |
︙ |