1995-04-09 01:28:47 +00:00
|
|
|
/* NSEnumerator abstrace class for GNUStep
|
1996-02-01 17:04:17 +00:00
|
|
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
1995-04-09 01:28:47 +00:00
|
|
|
|
1996-04-17 20:17:45 +00:00
|
|
|
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
1995-04-09 01:28:47 +00:00
|
|
|
Date: March 1995
|
|
|
|
|
1996-05-12 00:56:10 +00:00
|
|
|
This file is part of the GNUstep Base Library.
|
1995-04-09 01:28:47 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
1999-09-09 02:56:20 +00:00
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
1995-04-09 01:28:47 +00:00
|
|
|
*/
|
|
|
|
|
1997-11-06 00:51:23 +00:00
|
|
|
#include <config.h>
|
1998-12-20 21:27:47 +00:00
|
|
|
#include <base/preface.h>
|
1995-04-17 21:13:20 +00:00
|
|
|
#include <Foundation/NSUtilities.h>
|
2001-01-03 11:22:59 +00:00
|
|
|
#include <Foundation/NSArray.h>
|
1995-04-09 01:28:47 +00:00
|
|
|
|
|
|
|
@implementation NSEnumerator
|
|
|
|
|
2001-01-03 11:22:59 +00:00
|
|
|
- (NSArray *)allObjects
|
|
|
|
{
|
|
|
|
NSMutableArray *array;
|
|
|
|
id obj;
|
|
|
|
|
|
|
|
array = [NSMutableArray arrayWithCapacity:10];
|
|
|
|
|
|
|
|
while((obj = [self nextObject]))
|
|
|
|
[array addObject:obj];
|
|
|
|
|
|
|
|
return array;
|
|
|
|
}
|
|
|
|
|
1995-04-09 01:28:47 +00:00
|
|
|
- (id) nextObject
|
|
|
|
{
|
1996-02-01 17:04:17 +00:00
|
|
|
[self subclassResponsibility:_cmd];
|
1995-04-09 01:28:47 +00:00
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|