31 #import <Foundation/Foundation.h>
77 #define __AEArrayVar2(x, y) x ## y
78 #define __AEArrayVar(x, y) __AEArrayVar2(__ ## x ## _line_, y)
101 @interface AEArray : NSObject <NSFastEnumeration>
109 - (instancetype _Nonnull)
init;
139 - (void)updateWithContentsOfArray:(NSArray * _Nonnull)array;
174 - (
void * _Nullable)pointerValueAtIndex:(
int)index;
190 - (
void * _Nullable)pointerValueForObject:(
id _Nonnull)object;
205 - (void)updatePointerValue:(
void * _Nullable)value forObject:(
id _Nonnull)object;
210 - (
id _Nullable)objectAtIndexedSubscript:(NSUInteger)idx;
243 void * _Nullable
AEArrayGetItem(AEArrayToken _Nonnull token,
int index);
266 #define AEArrayEnumerateObjects(array, type, varname) \
267 AEArrayToken __AEArrayVar(token, __LINE__) = AEArrayGetToken(array); \
268 int __AEArrayVar(count, __LINE__) = AEArrayGetCount(__AEArrayVar(token, __LINE__)); \
269 int __AEArrayVar(i, __LINE__) = 0; \
270 for ( __unsafe_unretained type varname = __AEArrayVar(count, __LINE__) > 0 ? (__bridge type)AEArrayGetItem(__AEArrayVar(token, __LINE__), 0) : NULL; \
271 __AEArrayVar(i, __LINE__) < __AEArrayVar(count, __LINE__); \
272 __AEArrayVar(i, __LINE__)++, varname = __AEArrayVar(i, __LINE__) < __AEArrayVar(count, __LINE__) ? \
273 (__bridge type)AEArrayGetItem(__AEArrayVar(token, __LINE__), __AEArrayVar(i, __LINE__)) : NULL )
297 #define AEArrayEnumeratePointers(array, type, varname) \
298 AEArrayToken __AEArrayVar(token, __LINE__) = AEArrayGetToken(array); \
299 int __AEArrayVar(count, __LINE__) = AEArrayGetCount(__AEArrayVar(token, __LINE__)); \
300 int __AEArrayVar(i, __LINE__) = 0; \
301 for ( type varname = __AEArrayVar(count, __LINE__) > 0 ? (type)AEArrayGetItem(__AEArrayVar(token, __LINE__), 0) : NULL; \
302 __AEArrayVar(i, __LINE__) < __AEArrayVar(count, __LINE__); \
303 __AEArrayVar(i, __LINE__)++, varname = __AEArrayVar(i, __LINE__) < __AEArrayVar(count, __LINE__) ? \
304 (type)AEArrayGetItem(__AEArrayVar(token, __LINE__), __AEArrayVar(i, __LINE__)) : NULL )
308 @property (nonatomic, readonly)
int count;
311 @property (nonatomic, strong, readonly) NSArray * _Nonnull
allValues;