2016-02-22 21:04:18 +00:00
|
|
|
/*
|
1998-01-03 21:27:44 +00:00
|
|
|
NSEnumerator.h
|
|
|
|
|
|
|
|
Copyright (C) 1998 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Scott Christley <scottc@net-community.com>
|
|
|
|
Date: January 1998
|
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-09-14 11:36:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1998-01-03 21:27:44 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-08 10:38:33 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2016-02-22 21:04:18 +00:00
|
|
|
|
1998-01-03 21:27:44 +00:00
|
|
|
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.
|
|
|
|
|
2007-09-14 11:36:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1998-01-03 21:27:44 +00:00
|
|
|
License along with this library; if not, write to the Free
|
2006-10-31 07:05:46 +00:00
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02111 USA.
|
1998-01-03 21:27:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NSEnumerator_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSEnumerator_h_GNUSTEP_BASE_INCLUDE
|
2006-10-31 07:05:46 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
1998-01-03 21:27:44 +00:00
|
|
|
|
2006-10-31 07:05:46 +00:00
|
|
|
#import <Foundation/NSObject.h>
|
1998-01-03 21:27:44 +00:00
|
|
|
|
2016-02-22 21:04:18 +00:00
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-02-22 21:04:18 +00:00
|
|
|
@class GS_GENERIC_CLASS(NSArray, ElementT);
|
|
|
|
|
|
|
|
typedef struct
|
2009-01-28 12:03:41 +00:00
|
|
|
{
|
|
|
|
unsigned long state;
|
2011-06-29 11:50:26 +00:00
|
|
|
__unsafe_unretained id *itemsPtr;
|
2009-01-28 12:03:41 +00:00
|
|
|
unsigned long *mutationsPtr;
|
|
|
|
unsigned long extra[5];
|
|
|
|
} NSFastEnumerationState;
|
|
|
|
|
|
|
|
@protocol NSFastEnumeration
|
2016-02-22 21:04:18 +00:00
|
|
|
- (NSUInteger) countByEnumeratingWithState: (NSFastEnumerationState *)state
|
2011-07-24 13:09:22 +00:00
|
|
|
objects: (__unsafe_unretained id[])stackbuf
|
2009-01-28 12:03:41 +00:00
|
|
|
count: (NSUInteger)len;
|
|
|
|
@end
|
|
|
|
|
2016-02-22 21:04:18 +00:00
|
|
|
@interface GS_GENERIC_CLASS(NSEnumerator, IterT) : NSObject <NSFastEnumeration>
|
|
|
|
- (GS_GENERIC_CLASS(NSArray, IterT) *) allObjects;
|
|
|
|
- (GS_GENERIC_TYPE(IterT)) nextObject;
|
1998-01-03 21:27:44 +00:00
|
|
|
@end
|
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
1998-01-03 21:27:44 +00:00
|
|
|
#endif /* __NSEnumerator_h_GNUSTEP_BASE_INCLUDE */
|