93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
-
+
+
-
+
-
-
+
+
-
+
|
- (void)release
{
}
- (void)dealloc
{
@throw [OFNotImplementedException exceptionWithClass: isa
@throw [OFNotImplementedException exceptionWithClass: [self class]
selector: _cmd];
[super dealloc]; /* Get rid of a stupid warning */
}
@end
@implementation OFCountedSet
+ (void)initialize
{
if (self == [OFCountedSet class])
object_setClass((id)&placeholder,
placeholder.isa = [OFCountedSet_placeholder class];
[OFCountedSet_placeholder class]);
}
+ alloc
{
if (self == [OFCountedSet class])
return (id)&placeholder;
return [super alloc];
}
- init
{
if (isa == [OFCountedSet class]) {
Class c = isa;
if (object_getClass(self) == [OFCountedSet class]) {
Class c = [self class];
[self release];
@throw [OFNotImplementedException exceptionWithClass: c
selector: _cmd];
}
return [super init];
}
- (size_t)countForObject: (id)object
{
@throw [OFNotImplementedException exceptionWithClass: isa
@throw [OFNotImplementedException exceptionWithClass: [self class]
selector: _cmd];
}
- (OFString*)description
{
OFMutableString *ret;
OFAutoreleasePool *pool, *pool2;
|