14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
+
+
|
*/
#import "OFData.h"
OF_ASSUME_NONNULL_BEGIN
@class OFString;
@class OFURL;
@class OFURI;
/**
* @class OFMutableData OFMutableData.h ObjFW/OFMutableData.h
*
* @brief A class for storing and manipulating arbitrary data in an array.
*/
@interface OFMutableData: OFData
{
size_t _capacity;
OF_RESERVE_IVARS(OFMutableData, 4)
}
/**
* @brief All items of the OFMutableData as a C array.
*
* @warning The pointer is only valid until the OFMutableData is changed!
*
* Modifying the returned array directly is allowed and will change the contents
* of the data.
*/
@property (readonly, nonatomic) void *mutableItems OF_RETURNS_INNER_POINTER;
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *mutableItems
OF_RETURNS_INNER_POINTER;
/**
* @brief The first item of the OFMutableData or `NULL`.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *mutableFirstItem
OF_RETURNS_INNER_POINTER;
|
199
200
201
202
203
204
205
206
207
208
209
210
211
|
200
201
202
203
204
205
206
207
208
209
210
211
212
|
-
+
|
/**
* @brief Removes all items.
*/
- (void)removeAllItems;
/**
* @brief Converts the mutable URL to an immutable URL.
* @brief Converts the mutable data to an immutable data.
*/
- (void)makeImmutable;
@end
OF_ASSUME_NONNULL_END
|