SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
HexFiend/HFBTree.h
1 //
2 // HFBTree.h
3 // HexFiend
4 //
5 //
6
7 #import <Foundation/Foundation.h>
8
9 typedef unsigned long long HFBTreeIndex;
10
11 @class HFBTreeNode;
12
13 @protocol HFBTreeEntry <NSObject>
14 - (unsigned long long)length;
15 @end
16
17 @interface HFBTree : NSObject <NSMutableCopying, HFBTreeEntry> {
18 unsigned int depth;
19 HFBTreeNode *root;
20 }
21
22 - (void)insertEntry:(id)entry atOffset:(HFBTreeIndex)offset;
23 - (id)entryContainingOffset:(HFBTreeIndex)offset beginningOffset:(HFBTreeIndex *)outBeginningOffset;
24 - (void)removeEntryAtOffset:(HFBTreeIndex)offset;
25 - (void)removeAllEntries;
26
27 #if HFUNIT_TESTS
28 - (void)checkIntegrityOfCachedLengths;
29 - (void)checkIntegrityOfBTreeStructure;
30 #endif
31
32 - (NSEnumerator *)entryEnumerator;
33 - (NSArray *)allEntries;
34
35 - (HFBTreeIndex)length;
36
37 /* Applies the given function to the entry at the given offset, continuing with subsequent entries until the function returns NO. Do not modify the tree from within this function. */
38 - (void)applyFunction:(BOOL (*)(id entry, HFBTreeIndex offset, void *userInfo))func toEntriesStartingAtOffset:(HFBTreeIndex)offset withUserInfo:(void *)userInfo;
39
40 @end
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.