summaryrefslogtreecommitdiff
path: root/dmagick/c/splayTree.d
blob: 69451bdf3165565a02a4cd573a334e9533676cf2 (plain)
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
module dmagick.c.splayTree;

import dmagick.c.magickType;

extern(C)
{
	struct SplayTreeInfo {}

	MagickBooleanType AddValueToSplayTree(SplayTreeInfo*, const void*, const void*);
	MagickBooleanType DeleteNodeByValueFromSplayTree(SplayTreeInfo*, const void*);
	MagickBooleanType DeleteNodeFromSplayTree(SplayTreeInfo*, const void*);

	const(void)* GetNextKeyInSplayTree(SplayTreeInfo*);
	const(void)* GetNextValueInSplayTree(SplayTreeInfo*);
	const(void)* GetValueFromSplayTree(SplayTreeInfo*, const void*);

	int CompareSplayTreeString(const void*, const void*);
	int CompareSplayTreeStringInfo(const void*, const void*);

	SplayTreeInfo* CloneSplayTree(SplayTreeInfo*, void* function(void*), void* function(void*));
	SplayTreeInfo* DestroySplayTree(SplayTreeInfo*);
	SplayTreeInfo* NewSplayTree(int function(const void*, const void*), void* function(void*), void* function(void*));

	size_t GetNumberOfNodesInSplayTree(const SplayTreeInfo*);

	void* RemoveNodeByValueFromSplayTree(SplayTreeInfo*, const void*);
	void* RemoveNodeFromSplayTree(SplayTreeInfo*, const void*);
	void  ResetSplayTree(SplayTreeInfo*);
	void  ResetSplayTreeIterator(SplayTreeInfo*);
}