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