ObjFW  Diff

Differences From Artifact [5959e95840]:

To Artifact [dbaf155683]:


14
15
16
17
18
19
20


21
22
23
24
25
26
27
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+







 * file.
 */

#import "OFObject.h"
#import "OFSerialization.h"
#import "OFMessagePackRepresentation.h"

OF_ASSUME_NONNULL_BEGIN

@class OFString;
@class OFURL;

/*!
 * @class OFDataArray OFDataArray.h ObjFW/OFDataArray.h
 *
 * @brief A class for storing arbitrary data in an array.
226
227
228
229
230
231
232
233

234
235
236
237
238
239
240

241
242
243
244
245
246
247
228
229
230
231
232
233
234

235
236
237
238
239
240
241

242
243
244
245
246
247
248
249







-
+






-
+







- (void*)itemAtIndex: (size_t)index OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the first item of the OFDataArray.
 *
 * @return The first item of the OFDataArray or NULL
 */
- (void*)firstItem OF_RETURNS_INNER_POINTER;
- (nullable void*)firstItem OF_RETURNS_INNER_POINTER;

/*!
 * @brief Returns the last item of the OFDataArray.
 *
 * @return The last item of the OFDataArray or NULL
 */
- (void*)lastItem OF_RETURNS_INNER_POINTER;
- (nullable void*)lastItem OF_RETURNS_INNER_POINTER;

/*!
 * @brief Adds an item to the OFDataArray.
 *
 * @param item A pointer to an arbitrary item
 */
- (void)addItem: (const void*)item;
321
322
323
324
325
326
327


328
329
330
323
324
325
326
327
328
329
330
331
332
333
334







+
+



 * @brief Writes the OFDataArray into the specified file.
 *
 * @param path The path of the file to write to
 */
- (void)writeToFile: (OFString*)path;
#endif
@end

OF_ASSUME_NONNULL_END

#import "OFDataArray+Hashing.h"
#import "OFDataArray+MessagePackValue.h"