16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#import "OFValue.h"
#import "OFBytesValue.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
|
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#import "OFValue.h"
#import "OFBytesValue.h"
#import "OFMethodSignature.h"
#import "OFNonretainedObjectValue.h"
#import "OFPointValue.h"
#import "OFPointerValue.h"
#import "OFRangeValue.h"
#import "OFRectValue.h"
#import "OFSizeValue.h"
#import "OFString.h"
#import "OFOutOfMemoryException.h"
@implementation OFValue
+ (instancetype)alloc
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
}
+ (instancetype)valueWithSize: (OFSize)size
{
return [[[OFSizeValue alloc] initWithSize: size] 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
}
|
|
|
<
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
}
+ (instancetype)valueWithSize: (OFSize)size
{
return [[[OFSizeValue alloc] initWithSize: size] autorelease];
}
+ (instancetype)valueWithRect: (OFRect)rect
{
return [[[OFRectValue alloc] initWithRect: rect] autorelease];
}
- (instancetype)initWithBytes: (const void *)bytes
objCType: (const char *)objCType
{
OF_INVALID_INIT_METHOD
}
|
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
- (OFSize)sizeValue
{
OFSize ret;
[self getValue: &ret size: sizeof(ret)];
return ret;
}
- (of_rectangle_t)rectangleValue
{
of_rectangle_t ret;
[self getValue: &ret size: sizeof(ret)];
return ret;
}
- (OFString *)description
{
OFMutableString *ret =
|
|
|
|
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
- (OFSize)sizeValue
{
OFSize ret;
[self getValue: &ret size: sizeof(ret)];
return ret;
}
- (OFRect)rectValue
{
OFRect ret;
[self getValue: &ret size: sizeof(ret)];
return ret;
}
- (OFString *)description
{
OFMutableString *ret =
|