ObjFW  Diff

Differences From Artifact [57c5a42ed5]:

To Artifact [c62f9e27d2]:


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 "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
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







-
+




-
+




-
+

-
+
-








+ (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
{
	return [[[OFRectangleValue alloc]
	    initWithRectangle: rectangle] autorelease];
}
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
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







-
+

-
+




-
+

-
+




-
+

-
+







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

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

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

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

- (of_rectangle_t)rectangleValue
{
	of_rectangle_t ret;