mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
([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:
parent
9058055f2b
commit
712b81db57
1 changed files with 19 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue