-
Notifications
You must be signed in to change notification settings - Fork 0
/
Headers.m
executable file
·89 lines (72 loc) · 1.25 KB
/
Headers.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//
// Headers.m
// Trinity
//
// Created by Peter Appel on 20/01/2008.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "Headers.h"
@implementation Headers
-(id)init
{
if (self = [super init])
{
[self setAHeader:@"links"];
[self setBHeader:@"rechts"];
[self setCHeader:@"op"];
}
return self;
}
-(void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:aHeader forKey:@"aHeader"];
[coder encodeObject:bHeader forKey:@"bHeader"];
[coder encodeObject:cHeader forKey:@"cHeader"];
}
-(id)initWithCoder:(NSCoder *)coder
{
if (self = [super init]) {
[self setCHeader:[coder decodeObjectForKey:@"aHeader"]];
[self setBHeader:[coder decodeObjectForKey:@"bHeader"]];
[self setCHeader:[coder decodeObjectForKey:@"cHeader"]];
}
return self;
}
- (void)setAHeader:(NSString *)x
{
x = [x copy];
[aHeader release];
aHeader = x;
}
- (void)setBHeader:(NSString *)x
{
x = [x copy];
[bHeader release];
bHeader = x;
}
- (void)setCHeader:(NSString *)x
{
x = [x copy];
[cHeader release];
cHeader = x;
}
- (NSString *)aHeader
{
return aHeader;
}
- (NSString *)bHeader
{
return bHeader;
}
- (NSString *)cHeader
{
return cHeader;
}
-(void)dealloc
{
[aHeader release];
[bHeader release];
[cHeader release];
[super dealloc];
}
@end