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
|
Class c = isa;
[self release];
@throw [OFNotImplementedException newWithClass: c
selector: _cmd];
}
- initWithClass: (Class)class_
hash: (OFHash*)hash_
{
self = [super initWithClass: class_];
@try {
hash = [hash_ retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[hash release];
[super dealloc];
}
- (OFString*)description
{
if (description != nil)
return description;
description = [[OFString alloc] initWithFormat:
@"The hash has already been calculated in class %@ and thus no new "
@"data can be added", inClass];
return description;
}
- (OFHash*)hashObject
{
return hash;
}
@end
|
|
|
|
|
|
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
|
Class c = isa;
[self release];
@throw [OFNotImplementedException newWithClass: c
selector: _cmd];
}
- initWithClass: (Class)class_
hash: (OFHash*)hash
{
self = [super initWithClass: class_];
@try {
hashObject = [hash retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[hashObject release];
[super dealloc];
}
- (OFString*)description
{
if (description != nil)
return description;
description = [[OFString alloc] initWithFormat:
@"The hash has already been calculated in class %@ and thus no new "
@"data can be added", inClass];
return description;
}
- (OFHash*)hashObject
{
return hashObject;
}
@end
|