12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#include <assert.h>
#import "OFMutableSet.h"
#import "OFMutableSet_hashtable.h"
#import "OFNotImplementedException.h"
#import "autorelease.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableSet_placeholder: OFMutableSet
|
>
>
<
<
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#include <stdlib.h>
#include <assert.h>
#import "OFMutableSet.h"
#import "OFMutableSet_hashtable.h"
#import "autorelease.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableSet_placeholder: OFMutableSet
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
- (void)release
{
}
- (void)dealloc
{
@throw [OFNotImplementedException exceptionWithClass: [self class]
selector: _cmd];
[super dealloc]; /* Get rid of a stupid warning */
}
@end
@implementation OFMutableSet
+ (void)initialize
{
if (self == [OFMutableSet class])
|
|
>
|
|
>
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
- (void)release
{
}
- (void)dealloc
{
[self doesNotRecognizeSelector: _cmd];
abort();
/* Get rid of a stupid warning */
[super dealloc];
}
@end
@implementation OFMutableSet
+ (void)initialize
{
if (self == [OFMutableSet class])
|
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
144
145
146
147
148
149
|
return [super alloc];
}
- init
{
if (object_getClass(self) == [OFMutableSet class]) {
Class c = [self class];
[self release];
@throw [OFNotImplementedException exceptionWithClass: c
selector: _cmd];
}
return [super init];
}
- (void)addObject: (id)object
{
@throw [OFNotImplementedException exceptionWithClass: [self class]
selector: _cmd];
}
- (void)removeObject: (id)object
{
@throw [OFNotImplementedException exceptionWithClass: [self class]
selector: _cmd];
}
- (void)minusSet: (OFSet*)set
{
void *pool = objc_autoreleasePoolPush();
OFEnumerator *enumerator = [set objectEnumerator];
id object;
|
>
|
>
>
|
|
<
>
<
|
>
<
|
>
|
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
144
145
146
147
148
149
150
151
152
153
154
|
return [super alloc];
}
- init
{
if (object_getClass(self) == [OFMutableSet class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
@throw e;
}
}
return [super init];
}
- (void)addObject: (id)object
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void)removeObject: (id)object
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void)minusSet: (OFSet*)set
{
void *pool = objc_autoreleasePoolPush();
OFEnumerator *enumerator = [set objectEnumerator];
id object;
|