HexFiend: HFIndexSet.h Source File

HexFiend

HFIndexSet.h
Go to the documentation of this file.
1 //
2 // HFIndexSet.h
3 // HexFiend_2
4 //
5 // Copyright 2010 ridiculous_fish. All rights reserved.
6 //
7
8 #import <Foundation/Foundation.h>
9
10
14 @interface HFIndexSet : NSObject <NSCopying, NSMutableCopying> {
15 @protected
16 NSUInteger rangeCount;
17 NSUInteger rangeCapacity;
18 HFRange singleRange;
19 HFRange *multipleRanges;
20 }
21
23 - (instancetype)init;
24
26 - (instancetype)initWithValue:(unsigned long long)value;
27
29 - (instancetype)initWithValuesInRange:(HFRange)range;
30
32 - (instancetype)initWithIndexSet:(HFIndexSet *)otherSet;
33
35 - (NSUInteger)numberOfRanges;
36
38 - (HFRange)rangeAtIndex:(NSUInteger)idx;
39
41 - (unsigned long long)countOfValuesInRange:(HFRange)range;
42
44 - (unsigned long long)countOfValues;
45
46 #if ! NDEBUG
47 - (void)verifyIntegrity;
48 #endif
49
51 - (HFRange)rangeContainingValue:(unsigned long long)idx;
52
54 - (BOOL)isEqualToNSIndexSet:(NSIndexSet *)indexSet;
55
56 @end
57
61 @interface HFMutableIndexSet : HFIndexSet
62
64 - (void)addIndexesInRange:(HFRange)range;
65
67 - (void)removeIndexesInRange:(HFRange)range;
68
70 - (void)shiftValuesRightByAmount:(unsigned long long)delta startingAtValue:(unsigned long long)value;
71
73 - (void)shiftValuesLeftByAmount:(unsigned long long)delta startingAtValue:(unsigned long long)value;
74
76 - (void)shiftValuesLeftByAmount:(unsigned long long)delta endingAtValue:(unsigned long long)value;
77
78 @end
HFMutableIndexSet
The mutable subclass of HFIndexSet.
Definition: HFIndexSet.h:55
-[HFIndexSet verifyIntegrity]
void verifyIntegrity()
HFRange
HFRange is the 64 bit analog of NSRange, containing a 64 bit location and length. ...
Definition: HFTypes.h:2
-[HFIndexSet init]
instancetype init()
-[HFIndexSet countOfValues]
unsigned long long countOfValues()
-[HFIndexSet numberOfRanges]
NSUInteger numberOfRanges()
HFIndexSet
Hex Fiend&#39;s answer to NSIndexSet. It can contain any unsigned long long value.
Definition: HFIndexSet.h:14