removed unused case
[ragel.git] / aapl / avlset.h
blob224ee59f8b3fc83d7bb4dd72278bd8d8090d6ddb
1 /*
2 * Copyright 2002 Adrian Thurston <thurston@cs.queensu.ca>
3 */
5 /* This file is part of Aapl.
7 * Aapl is free software; you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License as published by the Free
9 * Software Foundation; either version 2.1 of the License, or (at your option)
10 * any later version.
12 * Aapl is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 * more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
19 * Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _AAPL_AVLSET_H
23 #define _AAPL_AVLSET_H
25 #include "compare.h"
27 /**
28 * \addtogroup avltree
29 * @{
32 /**
33 * \class AvlSet
34 * \brief Key-only oriented tree.
36 * AvlSet stores only keys in elements that are managed by the tree. AvlSet
37 * requires that a Key type and a class containing a compare() routine
38 * for Key be given. Items are inserted with just a key value.
40 * AvlSet assumes all elements in the tree are allocated on the heap and are
41 * to be managed by the tree. This means that the class destructor will delete
42 * the contents of the tree. A deep copy will cause existing elements to be
43 * deleted first.
45 * \include ex_avlset.cpp
48 /*@}*/
50 #define AVLTREE_SET
51 #define BASE_EL(name) name
52 #define BASEKEY(name) name
53 #define AVLMEL_CLASSDEF class Key, class Compare = CmpOrd<Key>
54 #define AVLMEL_TEMPDEF class Key, class Compare
55 #define AVLMEL_TEMPUSE Key, Compare
56 #define AvlTree AvlSet
57 #define Element AvlSetEl<Key>
59 #include "avlcommon.h"
61 #undef AVLTREE_SET
62 #undef BASE_EL
63 #undef BASEKEY
64 #undef AVLMEL_CLASSDEF
65 #undef AVLMEL_TEMPDEF
66 #undef AVLMEL_TEMPUSE
67 #undef AvlTree
68 #undef Element
70 #endif /* _AAPL_AVLSET_H */