CACAO
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
source
cacao
src
toolbox
avl.hpp
Go to the documentation of this file.
1
/* src/toolbox/avl.hpp - AVL tree implementation
2
3
Copyright (C) 1996-2013
4
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6
This file is part of CACAO.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License as
10
published by the Free Software Foundation; either version 2, or (at
11
your option) any later version.
12
13
This program is distributed in the hope that it will be useful, but
14
WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
02110-1301, USA.
22
23
*/
24
25
26
#ifndef AVL_HPP_
27
#define AVL_HPP_ 1
28
29
#include "
vm/types.hpp
"
// for s4
30
31
struct
avl_tree_t
;
32
struct
avl_node_t
;
33
34
/* tree comparator prototype **************************************************/
35
36
typedef
s4
avl_comparator
(
const
void
*treenode,
const
void
*node);
37
38
/* function prototypes ********************************************************/
39
40
avl_tree_t
*
avl_create
(
avl_comparator
*
comparator
);
41
bool
avl_insert
(
avl_tree_t
*tree,
void
*
data
);
42
void
*
avl_find
(
avl_tree_t
*tree,
void
*
data
);
43
44
#if !defined(NDEBUG)
45
void
avl_dump
(
avl_node_t
* node,
s4
indent
);
46
#endif
47
48
#endif // AVL_HPP_
49
50
51
/*
52
* These are local overrides for various environment variables in Emacs.
53
* Please do not remove this and leave it at the end of the file, where
54
* Emacs will automagically detect them.
55
* ---------------------------------------------------------------------
56
* Local variables:
57
* mode: c++
58
* indent-tabs-mode: t
59
* c-basic-offset: 4
60
* tab-width: 4
61
* End:
62
*/
comparator
Definition:
threadlist.cpp:212
avl_node_t
Definition:
avl.cpp:52
avl_insert
bool avl_insert(avl_tree_t *tree, void *data)
Definition:
avl.cpp:317
types.hpp
avl_node_t::data
void * data
Definition:
avl.cpp:53
cacao::indent
Indent indent
Definition:
OStream.cpp:54
avl_find
void * avl_find(avl_tree_t *tree, void *data)
Definition:
avl.cpp:350
avl_tree_t
Definition:
avl.cpp:42
s4
int32_t s4
Definition:
types.hpp:45
avl_comparator
s4 avl_comparator(const void *treenode, const void *node)
Definition:
avl.hpp:36
avl_dump
void avl_dump(avl_node_t *node, s4 indent)
Definition:
avl.cpp:395
avl_create
avl_tree_t * avl_create(avl_comparator *comparator)
Definition:
avl.cpp:65
Generated on Fri Aug 4 2017 03:01:46 for CACAO by
1.8.5