Overview
Comment: | Simplify OFValue |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e41940c022a90ea557f5af6e493df814 |
User & Date: | js on 2021-04-13 21:43:42 |
Other Links: | manifest | tags |
Context
2021-04-17
| ||
00:57 | OFNumber: Remove useless OF_UNAVAILABLE check-in: 27002f2efe user: js tags: trunk | |
00:14 | of_comparison_result_t -> OFComparisonResult check-in: 61fc389aee user: js tags: new-naming-convention | |
2021-04-13
| ||
21:43 | Simplify OFValue check-in: e41940c022 user: js tags: trunk | |
2021-04-09
| ||
01:28 | Split XML processing instructions into target/data check-in: d4b3f8ea70 user: js tags: trunk | |
Changes
Modified src/OFDimensionValue.h from [f7a2f0822f] to [1e5243cb9c].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFDimensionValue: OFValue { of_dimension_t _dimension; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFDimensionValue: OFValue { of_dimension_t _dimension; } - (instancetype)initWithDimension: (of_dimension_t)dimension; @end OF_ASSUME_NONNULL_END |
Modified src/OFNonretainedObjectValue.h from [324b0e8add] to [2e9ab2769c].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFNonretainedObjectValue: OFValue { id _object; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFNonretainedObjectValue: OFValue { id _object; } - (instancetype)initWithNonretainedObject: (id)object; @end OF_ASSUME_NONNULL_END |
Modified src/OFPointValue.h from [a55ded17fa] to [8f405bc77c].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFPointValue: OFValue { of_point_t _point; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFPointValue: OFValue { of_point_t _point; } - (instancetype)initWithPoint: (of_point_t)point; @end OF_ASSUME_NONNULL_END |
Modified src/OFPointerValue.h from [83e44d9bb8] to [76806b79ee].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFPointerValue: OFValue { void *_pointer; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFPointerValue: OFValue { void *_pointer; } - (instancetype)initWithPointer: (const void *)pointer; @end OF_ASSUME_NONNULL_END |
Modified src/OFRangeValue.h from [a296ed91e7] to [d625b84e6d].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFRangeValue: OFValue { of_range_t _range; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFRangeValue: OFValue { of_range_t _range; } - (instancetype)initWithRange: (of_range_t)range; @end OF_ASSUME_NONNULL_END |
Modified src/OFRectangleValue.h from [e2767981ab] to [6cb58bb467].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | OF_ASSUME_NONNULL_BEGIN @interface OFRectangleValue: OFValue { of_rectangle_t _rectangle; } @end OF_ASSUME_NONNULL_END | > > | 17 18 19 20 21 22 23 24 25 26 27 28 | OF_ASSUME_NONNULL_BEGIN @interface OFRectangleValue: OFValue { of_rectangle_t _rectangle; } - (instancetype)initWithRectangle: (of_rectangle_t)rectangle; @end OF_ASSUME_NONNULL_END |
Modified src/OFValue.h from [7e6204d34f] to [938b5927a6].
︙ | ︙ | |||
148 149 150 151 152 153 154 | * @param bytes The bytes containing the value * @param objCType The ObjC type encoding for the value * @return An initialized OFValue */ - (instancetype)initWithBytes: (const void *)bytes objCType: (const char *)objCType; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | * @param bytes The bytes containing the value * @param objCType The ObjC type encoding for the value * @return An initialized OFValue */ - (instancetype)initWithBytes: (const void *)bytes objCType: (const char *)objCType; /** * @brief Gets the value. * * If the specified size does not match, this raises an * @ref OFOutOfRangeException. * * @param value The buffer to copy the value into |
︙ | ︙ |
Modified src/OFValue.m from [0c9f7f6c34] to [57c5a42ed5].
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import "OFPointerValue.h" #import "OFRangeValue.h" #import "OFRectangleValue.h" #import "OFString.h" #import "OFOutOfMemoryException.h" | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | > | | | > | > | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 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 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 | #import "OFPointerValue.h" #import "OFRangeValue.h" #import "OFRectangleValue.h" #import "OFString.h" #import "OFOutOfMemoryException.h" @implementation OFValue + (instancetype)alloc { if (self == [OFValue class]) return [OFBytesValue alloc]; return [super alloc]; } + (instancetype)valueWithBytes: (const void *)bytes objCType: (const char *)objCType { return [[[OFBytesValue alloc] initWithBytes: bytes objCType: objCType] autorelease]; } + (instancetype)valueWithPointer: (const void *)pointer { return [[[OFPointerValue alloc] initWithPointer: pointer] autorelease]; } + (instancetype)valueWithNonretainedObject: (id)object { return [[[OFNonretainedObjectValue alloc] initWithNonretainedObject: object] autorelease]; } + (instancetype)valueWithRange: (of_range_t)range { return [[[OFRangeValue alloc] initWithRange: range] autorelease]; } + (instancetype)valueWithPoint: (of_point_t)point { return [[[OFPointValue alloc] initWithPoint: point] autorelease]; } + (instancetype)valueWithDimension: (of_dimension_t)dimension { return [[[OFDimensionValue alloc] initWithDimension: dimension] autorelease]; } + (instancetype)valueWithRectangle: (of_rectangle_t)rectangle { return [[[OFRectangleValue alloc] initWithRectangle: rectangle] autorelease]; } - (instancetype)initWithBytes: (const void *)bytes objCType: (const char *)objCType { OF_INVALID_INIT_METHOD } - (bool)isEqual: (id)object { const char *objCType; size_t size; |
︙ | ︙ |