#include <SimpleSplayTree.h>
Inheritance diagram for SimpleSplayTree::

Public Methods | |
| SimpleSplayTree (const char *nameBuff="Unnamed") | |
| Constructor, which specifies a name for the tree. | |
| bool & | duplicate () |
Returns the value of duplicate_flag. | |
| bool & | check_duplicates () |
Returns the value of check_duplicates_flag. | |
Protected Methods | |
| SimpleSplayTreeItem< T > * | insert (T *key) |
| void | extract (SimpleSplayTreeItem< T > *item, bool &status) |
Protected Attributes | |
| bool | duplicate_flag |
| Records whether the last item inserted was a duplicate. | |
| bool | check_duplicates_flag |
If true then track items in the tree that are duplicates. | |
The SimpleSplayTree class is derived from AbstractSplayTree, which defines the basic operations of the splay tree. This particular instantiation of splay trees uses a simple data type for the key, and no auxillary data is associated with the key. This greatly simplifies the definition of the splay tree, but it assumes that copying the key is relatively inexpensive (e.g. no memory allocation/deallocation is required).
This template class can be instantiated with a data type for which the following methods are defined: