Use -subclassResponsibility instead of -notImplemented

where appropriate.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@893 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-02-01 17:04:17 +00:00
parent 61411cf413
commit b84fb64d50
7 changed files with 46 additions and 46 deletions

View file

@ -1,5 +1,5 @@
/* Implementation for GNU Objective-C MutableString object /* Implementation for GNU Objective-C MutableString object
Copyright (C) 1993,1994 Free Software Foundation, Inc. Copyright (C) 1993,1994, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: July 1994 Date: July 1994
@ -32,7 +32,7 @@
/* This is the designated initializer */ /* This is the designated initializer */
- initWithCapacity: (unsigned)capacity - initWithCapacity: (unsigned)capacity
{ {
return [self notImplemented:_cmd]; return [self subclassResponsibility:_cmd];
} }
+ (MutableString*) stringWithCapacity: (unsigned)capacity + (MutableString*) stringWithCapacity: (unsigned)capacity
@ -41,17 +41,17 @@
return [n autorelease]; return [n autorelease];
} }
/* Subclasses need to implemented the next to methods */ /* Subclasses need to implemented the next two methods */
- removeRange: (IndexRange)range - removeRange: (IndexRange)range
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return self; return self;
} }
- (void) insertString: (String*)string atIndex: (unsigned)index - (void) insertString: (String*)string atIndex: (unsigned)index
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void) setString: (String*)string - (void) setString: (String*)string

View file

@ -1,5 +1,5 @@
/* NSArray - Array object to hold other objects. /* NSArray - Array object to hold other objects.
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
From skeleton by: Adam Fedor <fedor@boulder.colorado.edu> From skeleton by: Adam Fedor <fedor@boulder.colorado.edu>
@ -138,7 +138,7 @@ static Class NSMutableArray_concrete_class;
/* This is the designated initializer for NSArray. */ /* This is the designated initializer for NSArray. */
- initWithObjects: (id*)objects count: (unsigned)count - initWithObjects: (id*)objects count: (unsigned)count
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -202,13 +202,13 @@ static Class NSMutableArray_concrete_class;
- (unsigned) count - (unsigned) count
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
- objectAtIndex: (unsigned)index - objectAtIndex: (unsigned)index
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -388,7 +388,7 @@ static Class NSMutableArray_concrete_class;
/* This is the desgnated initializer for NSMutableArray */ /* This is the desgnated initializer for NSMutableArray */
- initWithCapacity: (unsigned)numItems - initWithCapacity: (unsigned)numItems
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }

View file

@ -1,5 +1,5 @@
/* Stream of bytes class for serialization and persistance in GNUStep /* Stream of bytes class for serialization and persistance in GNUStep
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: March 1995 Date: March 1995
@ -236,7 +236,7 @@ static Class NSMutableData_concrete_class;
- (const void*) bytes - (const void*) bytes
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return NULL; return NULL;
} }
@ -319,7 +319,7 @@ static Class NSMutableData_concrete_class;
- (unsigned int)length; - (unsigned int)length;
{ {
/* This is left to concrete subclasses to implement. */ /* This is left to concrete subclasses to implement. */
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -429,7 +429,7 @@ static Class NSMutableData_concrete_class;
atCursor: (unsigned int*)cursor atCursor: (unsigned int*)cursor
context: (id <NSObjCTypeSerializationCallBack>)callback context: (id <NSObjCTypeSerializationCallBack>)callback
{ {
return; [self notImplemented:_cmd];
} }
@ -459,13 +459,13 @@ static Class NSMutableData_concrete_class;
- (id) copyWithZone: (NSZone*)zone - (id) copyWithZone: (NSZone*)zone
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
- (id) mutableCopyWithZone: (NSZone*)zone - (id) mutableCopyWithZone: (NSZone*)zone
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -518,7 +518,7 @@ static Class NSMutableData_concrete_class;
/* This method not in OpenStep */ /* This method not in OpenStep */
- (unsigned) capacity - (unsigned) capacity
{ {
[self notImplemented:_cmd]; [self subclassResponsiblity:_cmd];
return 0; return 0;
} }
@ -531,12 +531,12 @@ static Class NSMutableData_concrete_class;
- (void) setLength: (unsigned int)length - (void) setLength: (unsigned int)length
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void*) mutableBytes - (void*) mutableBytes
{ {
[self notImplemented:_cmd]; [self subclassResponsibilty:_cmd];
return NULL; return NULL;
} }
@ -545,7 +545,7 @@ static Class NSMutableData_concrete_class;
- (void) appendBytes: (const void*)bytes - (void) appendBytes: (const void*)bytes
length: (unsigned int)length length: (unsigned int)length
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void) appendData: (NSData*)other - (void) appendData: (NSData*)other

View file

@ -1,5 +1,5 @@
/* NSDictionary - Dictionary object to store key/value pairs /* NSDictionary - Dictionary object to store key/value pairs
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
From skeleton by: Adam Fedor <fedor@boulder.colorado.edu> From skeleton by: Adam Fedor <fedor@boulder.colorado.edu>
@ -107,7 +107,7 @@ static Class NSMutableDictionary_concrete_class;
forKeys: (NSString**)keys forKeys: (NSString**)keys
count: (unsigned)count count: (unsigned)count
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -140,19 +140,19 @@ static Class NSMutableDictionary_concrete_class;
- (unsigned) count - (unsigned) count
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
- objectForKey: (NSString*)aKey - objectForKey: (NSString*)aKey
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
- (NSEnumerator*) keyEnumerator - (NSEnumerator*) keyEnumerator
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -243,7 +243,7 @@ static Class NSMutableDictionary_concrete_class;
- (NSEnumerator*) objectEnumerator - (NSEnumerator*) objectEnumerator
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -293,7 +293,7 @@ static Class NSMutableDictionary_concrete_class;
/* This is the designated initializer */ /* This is the designated initializer */
- initWithCapacity: (unsigned)numItems - initWithCapacity: (unsigned)numItems
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -310,12 +310,12 @@ static Class NSMutableDictionary_concrete_class;
- (void) setObject:anObject forKey:(NSString *)aKey - (void) setObject:anObject forKey:(NSString *)aKey
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void) removeObjectForKey:(NSString *)aKey - (void) removeObjectForKey:(NSString *)aKey
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void) removeAllObjects - (void) removeAllObjects

View file

@ -1,5 +1,5 @@
/* NSEnumerator abstrace class for GNUStep /* NSEnumerator abstrace class for GNUStep
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: March 1995 Date: March 1995
@ -28,7 +28,7 @@
- (id) nextObject - (id) nextObject
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }

View file

@ -1,5 +1,5 @@
/* Implementation of NSMutableData for GNUStep /* Implementation of NSMutableData for GNUStep
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: April 1995 Date: April 1995
@ -51,7 +51,7 @@
{ {
/* xxx Eventually we'll have to be aware of malloc'ed memory /* xxx Eventually we'll have to be aware of malloc'ed memory
vs vm_allocate'd memory, etc. */ vs vm_allocate'd memory, etc. */
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -65,7 +65,7 @@
/* This method not in OpenStep */ /* This method not in OpenStep */
- (unsigned) capacity - (unsigned) capacity
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -78,12 +78,12 @@
- (void) setLength: (unsigned int)length - (void) setLength: (unsigned int)length
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void*) mutableBytes - (void*) mutableBytes
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return NULL; return NULL;
} }
@ -92,7 +92,7 @@
- (void) appendBytes: (const void*)bytes - (void) appendBytes: (const void*)bytes
length: (unsigned int)length length: (unsigned int)length
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
} }
- (void) appendData: (NSData*)other - (void) appendData: (NSData*)other

View file

@ -1,5 +1,5 @@
/* Implementation of abstract superclass port for use with Connection /* Implementation of abstract superclass port for use with Connection
Copyright (C) 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu> Written by: R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
Date: July 1994 Date: July 1994
@ -28,19 +28,19 @@
+ newRegisteredPortWithName: (id <String>)n + newRegisteredPortWithName: (id <String>)n
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
+ newPortFromRegisterWithName: (id <String>)n onHost: (id <String>)host + newPortFromRegisterWithName: (id <String>)n onHost: (id <String>)host
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
+ newPort + newPort
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return nil; return nil;
} }
@ -50,7 +50,7 @@
toPort: (Port*) remote toPort: (Port*) remote
timeout: (int) milliseconds timeout: (int) milliseconds
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -64,7 +64,7 @@
fromPort: (Port**) remote fromPort: (Port**) remote
timeout: (int) milliseconds timeout: (int) milliseconds
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }
@ -76,19 +76,19 @@
- (BOOL) isSoft - (BOOL) isSoft
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return YES; return YES;
} }
- (BOOL) isEqual: anotherPort - (BOOL) isEqual: anotherPort
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return NO; return NO;
} }
- (unsigned) hash - (unsigned) hash
{ {
[self notImplemented:_cmd]; [self subclassResponsibility:_cmd];
return 0; return 0;
} }