([KeyEnumerator -initWithCollection:]): New method.

([KeyEnumerator -nextObject]): New method.
([KeyEnumerator -dealloc]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1369 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-04-16 02:50:42 +00:00
parent 9058055f2b
commit 712b81db57

View file

@ -30,7 +30,25 @@
@implementation KeyEnumerator
/* xxx What should be here? */
- initWithCollection: coll
{
collection = [coll retain];
enum_state = [coll newEnumState];
return self;
}
- nextObject
{
id k;
[collection nextObjectAndKey: &k withEnumState: &enum_state];
return k;
}
- (void) dealloc
{
[collection freeEnumState: &enum_state];
[collection release];
}
@end