xref: /aosp_15_r20/external/antlr/runtime/ObjC/Framework/AMutableDictionary.h (revision 16467b971bd3e2009fad32dd79016f2c7e421deb)
1*16467b97STreehugger Robot //
2*16467b97STreehugger Robot //  AMutableDictionary.h
3*16467b97STreehugger Robot //  ST4
4*16467b97STreehugger Robot //
5*16467b97STreehugger Robot //  Created by Alan Condit on 4/18/11.
6*16467b97STreehugger Robot //  Copyright 2011 Alan Condit. All rights reserved.
7*16467b97STreehugger Robot //
8*16467b97STreehugger Robot 
9*16467b97STreehugger Robot #import <Foundation/Foundation.h>
10*16467b97STreehugger Robot #import "ACBTree.h"
11*16467b97STreehugger Robot #import "ArrayIterator.h"
12*16467b97STreehugger Robot 
13*16467b97STreehugger Robot @class ACBTree;
14*16467b97STreehugger Robot @class ArrayIterator;
15*16467b97STreehugger Robot 
16*16467b97STreehugger Robot @interface AMutableDictionary : NSMutableDictionary {
17*16467b97STreehugger Robot 
18*16467b97STreehugger Robot     __strong ACBTree  *root;
19*16467b97STreehugger Robot     NSInteger nodes_av;
20*16467b97STreehugger Robot     NSInteger nodes_inuse;
21*16467b97STreehugger Robot     NSInteger nxt_nodeid;
22*16467b97STreehugger Robot     NSUInteger count;
23*16467b97STreehugger Robot     __strong NSMutableData *data;
24*16467b97STreehugger Robot     __strong id       *ptrBuffer;
25*16467b97STreehugger Robot }
26*16467b97STreehugger Robot 
27*16467b97STreehugger Robot @property (retain) ACBTree  *root;
28*16467b97STreehugger Robot @property (assign) NSInteger nodes_av;
29*16467b97STreehugger Robot @property (assign) NSInteger nodes_inuse;
30*16467b97STreehugger Robot @property (assign) NSInteger nxt_nodeid;
31*16467b97STreehugger Robot @property (assign, readonly, getter=count) NSUInteger count;
32*16467b97STreehugger Robot @property (assign) NSMutableData *data;
33*16467b97STreehugger Robot @property (assign) id       *ptrBuffer;
34*16467b97STreehugger Robot 
35*16467b97STreehugger Robot + (AMutableDictionary *) newDictionary;
36*16467b97STreehugger Robot + (AMutableDictionary *) dictionaryWithCapacity;
37*16467b97STreehugger Robot 
38*16467b97STreehugger Robot - (id) init;
39*16467b97STreehugger Robot - (id) initWithCapacity:(NSUInteger)numItems;
40*16467b97STreehugger Robot - (void) dealloc;
41*16467b97STreehugger Robot 
42*16467b97STreehugger Robot - (BOOL) isEqual:(id)object;
43*16467b97STreehugger Robot - (id) objectForKey:(id)aKey;
44*16467b97STreehugger Robot - (void) setObject:(id)obj forKey:(id)aKey;
45*16467b97STreehugger Robot - (void) removeObjectForKey:(id)aKey;
46*16467b97STreehugger Robot 
47*16467b97STreehugger Robot - (NSUInteger) count;
48*16467b97STreehugger Robot 
49*16467b97STreehugger Robot - (NSArray *) allKeys;
50*16467b97STreehugger Robot - (NSArray *) allValues;
51*16467b97STreehugger Robot - (ArrayIterator *) keyEnumerator;
52*16467b97STreehugger Robot - (ArrayIterator *) objectEnumerator;
53*16467b97STreehugger Robot 
54*16467b97STreehugger Robot - (void) clear;
55*16467b97STreehugger Robot - (void) removeAllObjects;
56*16467b97STreehugger Robot - (NSInteger) nextNodeId;
57*16467b97STreehugger Robot - (NSArray *) toKeyArray;
58*16467b97STreehugger Robot - (NSArray *) toValueArray;
59*16467b97STreehugger Robot 
60*16467b97STreehugger Robot @end
61