PageRenderTime 57ms CodeModel.GetById 54ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/BlocksKit/NSMutableIndexSet+BlocksKit.h

http://github.com/zwaldowski/BlocksKit
C++ Header | 46 lines | 6 code | 7 blank | 33 comment | 0 complexity | dc36a55f1d7e506594d9cf5f1dd10fae MD5 | raw file
 1//
 2//  NSMutableIndexSet+BlocksKit.h
 3//  %PROJECT
 4//
 5
 6#import "BKGlobals.h"
 7
 8/** Block extensions for NSMutableIndexSet.
 9 
10 These utilities expound upon the BlocksKit additions
11 to the immutable superclass by allowing certain utilities
12 to work on an instance of the mutable class, saving memory
13 by not creating an immutable copy of the results.
14 
15 Includes code by the following:
16 
17 - Zach Waldowski. <https://github.com/zwaldowski>. 2011. MIT.
18 
19 @see NSIndexSet(BlocksKit)
20 */
21@interface NSMutableIndexSet (BlocksKit)
22
23/** Filters a mutable index set to the indexes matching the block.
24 
25 @param block A single-argument, BOOL-returning code block.
26 @see reject:
27 */
28- (void)performSelect:(BKIndexValidationBlock)block;
29
30/** Filters a mutable index set to all indexes but the ones matching the block,
31 the logical inverse to select:.
32 
33 @param block A single-argument, BOOL-returning code block.
34 @see select:
35 */
36- (void)performReject:(BKIndexValidationBlock)block;
37
38/** Transform each index of the index set to a new index, as returned by the
39 block.
40 
41 @param block A block that returns a new index for a index.
42 */
43- (void)performMap:(BKIndexTransformBlock)block;
44
45
46@end