SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
HexFiend/HFAnnotatedTree.h
1 //
2 // HFAnnotatedTree.h
3 // HexFiend_2
4 //
5 // Copyright 2010 ridiculous_fish. All rights reserved.
6 //
7
8 #import <Foundation/NSObject.h>
9
10 typedef unsigned long long (*HFAnnotatedTreeAnnotaterFunction_t)(id left, id right);
11
12
13 @interface HFAnnotatedTreeNode : NSObject <NSMutableCopying> {
14 HFAnnotatedTreeNode *left;
15 HFAnnotatedTreeNode *right;
16 HFAnnotatedTreeNode *parent;
17 uint32_t level;
18 @public
19 unsigned long long annotation;
20 }
21
22 /* Pure virtual method, which must be overridden. */
23 - (NSComparisonResult)compare:(HFAnnotatedTreeNode *)node;
24
25 /* Returns the next in-order node. */
26 - (id)nextNode;
27
28 - (id)leftNode;
29 - (id)rightNode;
30 - (id)parentNode;
31
32 #if ! NDEBUG
33 - (void)verifyIntegrity;
34 - (void)verifyAnnotation:(HFAnnotatedTreeAnnotaterFunction_t)annotater;
35 #endif
36
37
38 @end
39
40
41 @interface HFAnnotatedTree : NSObject <NSMutableCopying> {
42 HFAnnotatedTreeAnnotaterFunction_t annotater;
43 HFAnnotatedTreeNode *root;
44 }
45
46 - (instancetype)initWithAnnotater:(HFAnnotatedTreeAnnotaterFunction_t)annotater;
47 - (void)insertNode:(HFAnnotatedTreeNode *)node;
48 - (void)removeNode:(HFAnnotatedTreeNode *)node;
49 - (id)rootNode;
50 - (id)firstNode;
51 - (BOOL)isEmpty;
52
53 #if ! NDEBUG
54 - (void)verifyIntegrity;
55 #endif
56
57 @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.