Differences From Artifact [3a6c360dd5]:
- File
src/OFData.h
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 8969) [annotate] [blame] [check-ins using]
To Artifact [d1decb9e79]:
- File
src/OFData.h
— part of check-in
[f3ccf14461]
at
2017-10-29 21:58:14
on branch trunk
— Convert methods to properties where appropriate
This improves Swift compatibility. (user: js, size: 8784) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | } /*! * The size of a single item in the OFData in bytes. */ @property (readonly, nonatomic) size_t itemSize; /*! * @brief Creates a new OFData with the specified `count` items of size 1. * * @param items The items to store in the OFData * @param count The number of items * @return A new autoreleased OFData */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | } /*! * The size of a single item in the OFData in bytes. */ @property (readonly, nonatomic) size_t itemSize; /*! * The number of items in the OFData. */ @property (readonly, nonatomic) size_t count; /*! * All elements of the OFData as a C array. * * @warning The pointer is only valid until the OFData is changed! * */ @property (readonly, nonatomic) const void *items OF_RETURNS_INNER_POINTER; /*! * The first item of the OFData or NULL. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *firstItem OF_RETURNS_INNER_POINTER; /*! * The last item of the OFData or NULL. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *lastItem OF_RETURNS_INNER_POINTER; /*! * The string representation of the data. * * The string representation is a hex dump of the data, grouped by itemSize * bytes. */ @property (readonly, nonatomic) OFString *stringRepresentation; /*! * A string containing the data in Base64 encoding. */ @property (readonly, nonatomic) OFString *stringByBase64Encoding; /*! * @brief Creates a new OFData with the specified `count` items of size 1. * * @param items The items to store in the OFData * @param count The number of items * @return A new autoreleased OFData */ |
︙ | ︙ | |||
231 232 233 234 235 236 237 | * containing the data of the Base64-encoded string. * * @param string The string with the Base64-encoded data * @return An initialized OFData */ - (instancetype)initWithBase64EncodedString: (OFString *)string; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | * containing the data of the Base64-encoded string. * * @param string The string with the Base64-encoded data * @return An initialized OFData */ - (instancetype)initWithBase64EncodedString: (OFString *)string; /*! * @brief Returns a specific item of the OFData. * * @param index The number of the item to return * @return The specified item of the OFData */ - (const void *)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER; #ifdef OF_HAVE_FILES /*! * @brief Writes the OFData into the specified file. * * @param path The path of the file to write to */ - (void)writeToFile: (OFString *)path; |
︙ | ︙ |