forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFSTestObjCClass1.m
75 lines (63 loc) · 1.74 KB
/
FSTestObjCClass1.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
/* FSTestObjCClass1.m Copyright (c) 2008-2009 Philippe Mougin. */
/* This software is open source. See the license. */
#import "FSTestObjCClass1.h"
@implementation FSTestObjCClass1
- (id) init
{
self = [super init];
if (self != nil)
{
iv__Bool = true;
iv_char = YES;
iv_unsigned_char = 5;
iv_short = -1972;
iv_unsigned_short = 1933;
iv_int = -300000;
iv_unsigned_int = 987654321;
iv_long = 88;
iv_unsigned_long = 89;
iv_long_long = -123;
iv_unsigned_long_long = 1500400300;
iv_id = @"hello";
iv_Class = [NSView class];
iv_float = 3;
iv_double = -1.23;
iv_SEL = @selector(init);
iv_NSRange = NSMakeRange(2, 10);
iv_NSSize = NSMakeSize(200.3, 400.25);
iv_CGSize = CGSizeMake(200.3, 400.25) ;
iv_NSPoint = NSMakePoint(100, 200);
iv_CGPoint = CGPointMake(100, 200);
iv_NSRect = NSMakeRect(5, 5, 640, 480);
iv_CGRect = CGRectMake(5, 5, 640, 480);
iv_voidPtr = NSAllocateCollectable(1,0);
}
return self;
}
- (void) dealloc
{
[iv_id release];
free(iv_voidPtr);
[deallocationProof appendString:@" FSTestObjCClass1 "];
[deallocationProof release];
[super dealloc];
}
- (void *) voidPtr
{
return iv_voidPtr;
}
- (id)tags
{
return [NSArray arrayWithObject:@"FSTestObjCClass1"];
}
- (NSMutableString *)deallocationProof
{
return deallocationProof;
}
- (void) setDeallocationProof:(NSMutableString *)proof
{
[proof retain];
[deallocationProof release];
deallocationProof = proof;
}
@end