ObjFW  Check-in [bfefa54668]

Overview
Comment:Move throwing an OFNotImplementedException in abstract classes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bfefa54668c7b803c0282357bfeb9e6cd9428f19fe96eae7405afc8211b515a2
User & Date: js on 2011-08-30 17:07:10
Other Links: manifest | tags
Context
2011-08-30
19:38
Fix forgotten rename of OFMutableArrayPlaceholder. check-in: caa6878d38 user: js tags: trunk
17:07
Move throwing an OFNotImplementedException in abstract classes. check-in: bfefa54668 user: js tags: trunk
16:40
Added tag 0.5.4-release for changeset 9f99a3af4949 check-in: cde28389ce user: js tags: trunk
Changes

Modified src/OFArray.m from [3f04bd66a0] to [fec0c02685].

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{
	return [[[self alloc] initWithCArray: objects
				      length: length] autorelease];
}

- init
{
	if ([self class] == [OFArray class] ||
	    [self class] == [OFMutableArray class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];







|
<







163
164
165
166
167
168
169
170

171
172
173
174
175
176
177
{
	return [[[self alloc] initWithCArray: objects
				      length: length] autorelease];
}

- init
{
	if (isa == [OFArray class]) {

		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];

Modified src/OFDictionary.m from [3cc46ccafd] to [252a3f02aa].

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
	va_end(arguments);

	return ret;
}

- init
{
	if ([self class] == [OFDictionary class] ||
	    [self class] == [OFMutableDictionary class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];







|
<







157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
	va_end(arguments);

	return ret;
}

- init
{
	if (isa == [OFDictionary class]) {

		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];

Modified src/OFMutableArray.m from [d57bcb65c8] to [a195b3476d].

119
120
121
122
123
124
125












126
127
128
129
130
131
132
+ alloc
{
	if (self == [OFMutableArray class])
		return (id)&placeholder;

	return [super alloc];
}













- copy
{
	return [[OFArray alloc] initWithArray: self];
}

- (void)addObject: (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
+ alloc
{
	if (self == [OFMutableArray class])
		return (id)&placeholder;

	return [super alloc];
}

- init
{
	if (isa == [OFMutableArray class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];
}

- copy
{
	return [[OFArray alloc] initWithArray: self];
}

- (void)addObject: (id)object

Modified src/OFMutableDictionary.m from [1646e68d29] to [8805a4fb1a].

114
115
116
117
118
119
120












121
122
123
124
125
126
127
+ alloc
{
	if (self == [OFMutableDictionary class])
		return (id)&placeholder;

	return [super alloc];
}













- (void)setObject: (id)object
	   forKey: (id <OFCopying>)key
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}







>
>
>
>
>
>
>
>
>
>
>
>







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
+ alloc
{
	if (self == [OFMutableDictionary class])
		return (id)&placeholder;

	return [super alloc];
}

- init
{
	if (isa == [OFMutableDictionary class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	return [super init];
}

- (void)setObject: (id)object
	   forKey: (id <OFCopying>)key
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}