1// 2// AMutableArray.h 3// a_ST4 4// 5// Created by Alan Condit on 3/12/11. 6// Copyright 2011 Alan's MachineWorks. All rights reserved. 7// 8 9#import <Cocoa/Cocoa.h> 10#import "ArrayIterator.h" 11 12@class ArrayIterator; 13 14@interface AMutableArray : NSMutableArray { 15 NSInteger BuffSize; 16 NSInteger count; 17 __strong NSMutableData *buffer; 18 __strong id *ptrBuffer; 19} 20 21+ (id) newArray; 22+ (id) arrayWithCapacity:(NSInteger)size; 23 24- (id) init; 25- (id) initWithCapacity:(NSInteger)size; 26- (id) copyWithZone:(NSZone *)aZone; 27 28- (void) addObject:(id)anObject; 29- (void) addObjectsFromArray:(NSArray *)anArray; 30- (id) objectAtIndex:(NSInteger)anIdx; 31- (void) insertObject:(id)anObject atIndex:(NSInteger)anIdx; 32- (void) removeAllObjects; 33- (void) removeLastObject; 34- (void) removeObjectAtIndex:(NSInteger)idx; 35- (void) replaceObjectAtIndex:(NSInteger)idx withObject:(id)obj; 36- (NSInteger) count; 37- (void)setCount:(NSInteger)cnt; 38//- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; 39- (NSArray *) allObjects; 40- (ArrayIterator *) objectEnumerator; 41- (void) ensureCapacity:(NSInteger) index; 42- (NSString *) description; 43- (NSString *) toString; 44 45@property (assign) NSInteger BuffSize; 46@property (assign, getter=count, setter=setCount:) NSInteger count; 47@property (retain) NSMutableData *buffer; 48@property (assign) id *ptrBuffer; 49 50@end 51