vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
MutNRLockArray.h
1 
2 #if IPHONE
3 #import <UIKit/UIKit.h>
4 #else
5 #import <Cocoa/Cocoa.h>
6 #endif
7 
8 #import "MutLockArray.h"
9 #import "ObjectHolder.h"
10 
11 
12 
14 
22  BOOL zwrFlag; // NO by default. if YES, uses mike ash's zeroing weak reference object instead of just storing a simple weak reference!
23 }
24 
25 + (id) arrayWithCapacity:(NSInteger)c;
26 
27 - (NSMutableArray *) createArrayCopy;
28 - (NSMutableArray *) lockCreateArrayCopyFromObjects;
29 - (NSMutableArray *) createArrayCopyFromObjects;
30 - (void) addObject:(id)o;
31 - (void) addObjectsFromArray:(id)a;
32 - (void) replaceWithObjectsFromArray:(id)a;
33 - (BOOL) insertObject:(id)o atIndex:(NSInteger)i;
34 - (id) lastObject;
35 - (void) removeObject:(id)o;
36 - (BOOL) containsObject:(id)o;
37 - (id) objectAtIndex:(NSInteger)i;
38 - (NSArray *) objectsAtIndexes:(NSIndexSet *)indexes;
39 - (NSInteger) indexOfObject:(id)o;
40 - (BOOL) containsIdenticalPtr:(id)o;
41 - (long) indexOfIdenticalPtr:(id)o;
42 - (void) removeIdenticalPtr:(id)o;
43 
45 @property (assign,readwrite) BOOL zwrFlag;
46 
47 // these methods exist because the lookup cost for an ObjectHolder can be significant for high-performance applications- these methods get the object from the ObjectHolder and call the method directly on it!
48 - (void) bruteForceMakeObjectsPerformSelector:(SEL)s;
49 - (void) lockBruteForceMakeObjectsPerformSelector:(SEL)s;
50 - (void) bruteForceMakeObjectsPerformSelector:(SEL)s withObject:(id)o;
51 - (void) lockBruteForceMakeObjectsPerformSelector:(SEL)s withObject:(id)o;
52 
53 
54 @end
BOOL zwrFlag
NO by default. if YES, the ObjectHolder instances created by this class will use Mike Ash's zeroing w...
Definition: MutNRLockArray.h:22
Subclass of MutLockArray; this class does NOT retain the objects in its array!
Definition: MutNRLockArray.h:21
Similar to NSMutableArray, but thread-safe. Internally, uses an NSMutableArray and a rwlock...
Definition: MutLockArray.h:20