Differences From Artifact [bb1eda01eb]:
- File
src/OFNumber.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: 10281) [annotate] [blame] [check-ins using] [more...]
To Artifact [f19e1bade2]:
- File src/OFNumber.h — part of check-in [c9115cce73] at 2023-08-09 15:24:07 on branch trunk — Make OFNumber a proper class cluster (user: js, size: 9851) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
35 36 37 38 39 40 41 | /** @file */ /** * @class OFNumber OFNumber.h ObjFW/OFNumber.h * * @brief Provides a way to store a number in an object. */ | < < < < < < < < < < < < | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | /** @file */ /** * @class OFNumber OFNumber.h ObjFW/OFNumber.h * * @brief Provides a way to store a number in an object. */ @interface OFNumber: OFValue <OFComparing, OFJSONRepresentation, OFMessagePackRepresentation> /** * @brief The OFNumber as a `bool`. */ @property (readonly, nonatomic) bool boolValue; /** * @brief The OFNumber as a `signed char`. |
︙ | ︙ | |||
119 120 121 122 123 124 125 | @property (readonly, nonatomic) double doubleValue; /** * @brief The OFNumber as a string. */ @property (readonly, nonatomic) OFString *stringValue; | < < | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | @property (readonly, nonatomic) double doubleValue; /** * @brief The OFNumber as a string. */ @property (readonly, nonatomic) OFString *stringValue; + (instancetype)valueWithPointer: (const void *)pointer OF_UNAVAILABLE; + (instancetype)valueWithNonretainedObject: (id)object OF_UNAVAILABLE; + (instancetype)valueWithRange: (OFRange)range OF_UNAVAILABLE; + (instancetype)valueWithPoint: (OFPoint)point OF_UNAVAILABLE; + (instancetype)valueWithSize: (OFSize)size OF_UNAVAILABLE; + (instancetype)valueWithRect: (OFRect)rect OF_UNAVAILABLE; |
︙ | ︙ | |||
232 233 234 235 236 237 238 | * @brief Creates a new OFNumber with the specified `double`. * * @param value The `double` value which the OFNumber should contain * @return A new autoreleased OFNumber */ + (instancetype)numberWithDouble: (double)value; | < < < < | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | * @brief Creates a new OFNumber with the specified `double`. * * @param value The `double` value which the OFNumber should contain * @return A new autoreleased OFNumber */ + (instancetype)numberWithDouble: (double)value; /** * @brief Initializes an already allocated OFNumber with the specified `bool`. * * @param value The `bool` value which the OFNumber should contain * @return An initialized OFNumber */ - (instancetype)initWithBool: (bool)value; |
︙ | ︙ |