Differences From Artifact [c6b9b129b7]:
- File
src/OFData.h
— part of check-in
[6ce0093f8d]
at
2023-04-10 19:22:32
on branch trunk
— Remove OFSerialization
While the idea sounds nice that the tag name is the class, this means the
serialization includes whether something is mutable or immutable. This means
doing as much as making something immutable changes the serialization, which
can then cause issues after being deserialized. (user: js, size: 10562) [annotate] [blame] [check-ins using] [more...]
To Artifact [3b565bfb8e]:
- File src/OFData.h — part of check-in [91fa20d993] at 2023-08-07 18:20:48 on branch trunk — Make OFData a class cluster (user: js, size: 11197) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
36 37 38 39 40 41 42 | /** * @class OFData OFData.h ObjFW/OFData.h * * @brief A class for storing arbitrary data in an array. */ @interface OFData: OFObject <OFCopying, OFMutableCopying, OFComparing, OFMessagePackRepresentation> | < < < < < < < < < | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | /** * @class OFData OFData.h ObjFW/OFData.h * * @brief A class for storing arbitrary data in an array. */ @interface OFData: OFObject <OFCopying, OFMutableCopying, OFComparing, OFMessagePackRepresentation> /** * @brief The size of a single item in the OFData in bytes. */ @property (readonly, nonatomic) size_t itemSize; /** * @brief The number of items in the OFData. |
︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 | @property (readonly, nonatomic) OFString *stringRepresentation; /** * @brief 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 */ | > > > > > > > > > > > > > > > | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | @property (readonly, nonatomic) OFString *stringRepresentation; /** * @brief A string containing the data in Base64 encoding. */ @property (readonly, nonatomic) OFString *stringByBase64Encoding; /** * @brief Creates a new OFData that is empty with an item size of 1. * * @return A new autoreleased OFData */ + (instancetype)data; /** * @brief Creates a new OFData that is empty with the specified item size. * * @param itemSize The size of a single element in the OFData * @return A new autoreleased OFData */ + (instancetype)dataWithItemSize: (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 */ |
︙ | ︙ | |||
188 189 190 191 192 193 194 195 196 197 198 199 200 201 | * @param string The string with the Base64-encoded data * @return A new autoreleased OFData * @throw OFInvalidFormatException The specified string is not correctly * formatted */ + (instancetype)dataWithBase64EncodedString: (OFString *)string; /** * @brief Initializes an already allocated 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 An initialized OFData | > > > > > > > > > > > > > > > > > | 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 | * @param string The string with the Base64-encoded data * @return A new autoreleased OFData * @throw OFInvalidFormatException The specified string is not correctly * formatted */ + (instancetype)dataWithBase64EncodedString: (OFString *)string; /** * @brief Initializes an already allocated OFData to be empty with an item size * of 1. * * @return An initialized OFData */ - (instancetype)init; /** * @brief Initializes an already allocated OFData to be empty with the * specified item size. * * @param itemSize The size of a single element in the OFData * @return An initialized OFData */ - (instancetype)initWithItemSize: (size_t)itemSize; /** * @brief Initializes an already allocated 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 An initialized OFData |
︙ | ︙ |