-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDKBinaryTree.h
More file actions
66 lines (45 loc) · 2.9 KB
/
Copy pathDKBinaryTree.h
File metadata and controls
66 lines (45 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// =======================================================================================
//
// DKBinaryTree.h
// Duck Object Library -- See LICENSE for legal information.
//
// Copyright (c) 2014-2026 Derek W. Nylen
//
// =======================================================================================
#ifndef _DK_BINARY_TREE_H_
#define _DK_BINARY_TREE_H_
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct DKBinaryTree * DKBinaryTreeRef;
typedef struct DKBinaryTree * DKMutableBinaryTreeRef;
DK_API DKClassRef DKBinaryTreeClass( void );
DK_API DKClassRef DKMutableBinaryTreeClass( void );
#define DKEmptyBinaryTree() DKAutorelease( DKNew( DKBinaryTreeClass() ) )
#define DKMutableBinaryTree() DKAutorelease( DKNew( DKMutableBinaryTreeClass() ) )
#define DKNewMutableBinaryTree() DKNew( DKMutableBinaryTreeClass() )
#define DKBinaryTreeWithCompareFunction( keyCompare ) DKAutorelease( DKNewBinaryTreeWithCompareFunction( keyCompare ) )
DK_API DKMutableBinaryTreeRef DKNewBinaryTreeWithCompareFunction( DKCompareFunction keyCompare );
DK_API DKObjectRef DKBinaryTreeInitDictionaryWithVAKeysAndObjects( DKBinaryTreeRef _self, va_list keysAndObjects );
DK_API DKObjectRef DKBinaryTreeInitDictionaryWithDictionary( DKBinaryTreeRef _self, DKDictionaryRef dictionary );
DK_API DKObjectRef DKBinaryTreeInitSetWithVAObjects( DKBinaryTreeRef _self, va_list objects );
DK_API DKObjectRef DKBinaryTreeInitSetWithCArray( DKBinaryTreeRef _self, DKObjectRef objects[], DKIndex count );
DK_API DKObjectRef DKBinaryTreeInitSetWithCollection( DKBinaryTreeRef _self, DKObjectRef collection );
DK_API DKBinaryTreeRef DKBinaryTreeCopy( DKBinaryTreeRef _self );
DK_API DKMutableBinaryTreeRef DKBinaryTreeMutableCopy( DKBinaryTreeRef _self );
DK_API DKIndex DKBinaryTreeGetCount( DKBinaryTreeRef _self );
DK_API DKObjectRef DKBinaryTreeGetObject( DKBinaryTreeRef _self, DKObjectRef key );
DK_API int DKBinaryTreeApplyFunction( DKBinaryTreeRef _self, DKKeyedApplierFunction callback, void * context );
DK_API int DKBinaryTreeApplyFunctionToKeys( DKBinaryTreeRef _self, DKApplierFunction callback, void * context );
DK_API int DKBinaryTreeApplyFunctionToObjects( DKBinaryTreeRef _self, DKApplierFunction callback, void * context );
DK_API int DKBinaryTreeTraverseInOrder( DKBinaryTreeRef _self, DKKeyedApplierFunction callback, void * context );
DK_API DKObjectRef DKBinaryTreeGetFirstObject( DKBinaryTreeRef _self );
DK_API void DKBinaryTreeInsertObject( DKMutableBinaryTreeRef _self, DKObjectRef key, DKObjectRef object, DKInsertPolicy policy );
DK_API void DKBinaryTreeRemoveObject( DKMutableBinaryTreeRef _self, DKObjectRef key );
DK_API void DKBinaryTreeRemoveAllObjects( DKMutableBinaryTreeRef _self );
DK_API void DKBinaryTreeAddObjectToSet( DKMutableBinaryTreeRef _self, DKObjectRef object );
#ifdef __cplusplus
}
#endif
#endif // _DK_BINARY_TREE_H_