ObjFW  Diff

Differences From Artifact [57c5a42ed5]:

To Artifact [712005bdcf]:


11
12
13
14
15
16
17
18
19
20
21
22
23
24


25
26
27
28
29
30
31
11
12
13
14
15
16
17

18
19
20
21
22

23
24
25
26
27
28
29
30
31







-





-
+
+







 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFValue.h"
#import "OFBytesValue.h"
#import "OFDimensionValue.h"
#import "OFMethodSignature.h"
#import "OFNonretainedObjectValue.h"
#import "OFPointValue.h"
#import "OFPointerValue.h"
#import "OFRangeValue.h"
#import "OFRectangleValue.h"
#import "OFRectValue.h"
#import "OFSizeValue.h"
#import "OFString.h"

#import "OFOutOfMemoryException.h"

@implementation OFValue
+ (instancetype)alloc
{
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
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







-
+




-
+




-
+

-
+
-


-
+

-
+
-








+ (instancetype)valueWithNonretainedObject: (id)object
{
	return [[[OFNonretainedObjectValue alloc]
	    initWithNonretainedObject: object] autorelease];
}

+ (instancetype)valueWithRange: (of_range_t)range
+ (instancetype)valueWithRange: (OFRange)range
{
	return [[[OFRangeValue alloc] initWithRange: range] autorelease];
}

+ (instancetype)valueWithPoint: (of_point_t)point
+ (instancetype)valueWithPoint: (OFPoint)point
{
	return [[[OFPointValue alloc] initWithPoint: point] autorelease];
}

+ (instancetype)valueWithDimension: (of_dimension_t)dimension
+ (instancetype)valueWithSize: (OFSize)size
{
	return [[[OFDimensionValue alloc]
	return [[[OFSizeValue alloc] initWithSize: size] autorelease];
	    initWithDimension: dimension] autorelease];
}

+ (instancetype)valueWithRectangle: (of_rectangle_t)rectangle
+ (instancetype)valueWithRect: (OFRect)rect
{
	return [[[OFRectangleValue alloc]
	return [[[OFRectValue alloc] initWithRect: rect] autorelease];
	    initWithRectangle: rectangle] autorelease];
}

- (instancetype)initWithBytes: (const void *)bytes
		     objCType: (const char *)objCType
{
	OF_INVALID_INIT_METHOD
}
169
170
171
172
173
174
175
176

177







178

179
180
181
182
183

184
185

186
187
188
189
190
191
192
193
194
195
196

197
198
199

200
201
202
203
204
205
206
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182

183
184
185
186
187

188
189

190
191
192
193
194







195

196

197
198
199
200
201
202
203
204







-
+

+
+
+
+
+
+
+
-
+




-
+

-
+




-
-
-
-
-
-
-
+
-

-
+







- (id)nonretainedObjectValue
{
	id ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (of_range_t)rangeValue
- (OFRange)rangeValue
{
	OFRange ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (OFPoint)pointValue
{
	of_range_t ret;
	OFPoint ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (of_point_t)pointValue
- (OFSize)sizeValue
{
	of_point_t ret;
	OFSize ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (of_dimension_t)dimensionValue
{
	of_dimension_t ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (OFRect)rectValue
- (of_rectangle_t)rectangleValue
{
	of_rectangle_t ret;
	OFRect ret;
	[self getValue: &ret size: sizeof(ret)];
	return ret;
}

- (OFString *)description
{
	OFMutableString *ret =