#include <splay.h>


Public Types | |
typedef V | Value |
typedef int | SPLAYCMP(Value const &a, Value const &b) |
typedef void | SPLAYFREE(Value &) |
typedef void | SPLAYWALKEE(Value const &nodedata, void *state) |
Public Member Functions | |
SplayNode (Value const &) | |
void | destroy (SPLAYFREE *=DefaultFree) |
SplayNode< V > const * | start () const |
SplayNode< V > const * | finish () const |
SplayNode< V > * | remove (const Value data, SPLAYCMP *compare) |
SplayNode< V > * | insert (Value data, SPLAYCMP *compare) |
template<class FindValue > | |
SplayNode< V > * | splay (const FindValue &data, int(*compare)(FindValue const &a, Value const &b)) const |
template<class Visitor > | |
void | visit (Visitor &v) const |
recursively visit left nodes, this node, and then right nodes More... | |
Static Public Member Functions | |
static void | DefaultFree (Value &aValue) |
Public Attributes | |
Value | data |
SplayNode< V > * | left |
SplayNode< V > * | right |
Detailed Description
Member Typedef Documentation
◆ SPLAYCMP
◆ SPLAYFREE
◆ SPLAYWALKEE
◆ Value
Constructor & Destructor Documentation
◆ SplayNode()
SplayNode< V >::SplayNode | ( | Value const & | someData | ) |
Member Function Documentation
◆ DefaultFree()
◆ destroy()
void SplayNode< V >::destroy | ( | SPLAYFREE * | free_func = DefaultFree | ) |
Definition at line 120 of file splay.h.
References SplayNode< V >::destroy().
Referenced by SplayNode< V >::destroy(), and main().
◆ finish()
Definition at line 110 of file splay.h.
References SplayNode< V >::finish().
Referenced by SplayNode< V >::finish().
◆ insert()
Definition at line 160 of file splay.h.
References SplayNode< V >::left, SplayNode< V >::right, and splayLastResult.
Referenced by main().
◆ remove()
Definition at line 135 of file splay.h.
References SplayNode< V >::left, SplayNode< V >::right, and splayLastResult.
◆ splay()
SplayNode< V > * SplayNode< V >::splay | ( | const FindValue & | data, |
int(*)(FindValue const &a, Value const &b) | compare | ||
) | const |
look in the splay for data for where compare(data,candidate) == true. return NULL if not found, a pointer to the sought data if found.
Definition at line 186 of file splay.h.
References SplayNode< V >::data, SplayNode< V >::left, SplayNode< V >::right, and splayLastResult.
◆ start()
Definition at line 100 of file splay.h.
References SplayNode< V >::start().
Referenced by SplayNode< V >::start().
◆ visit()
Definition at line 250 of file splay.h.
References SplayNode< V >::visit().
Referenced by main(), and SplayNode< V >::visit().
Member Data Documentation
◆ data
Definition at line 27 of file splay.h.
Referenced by mem_hdr::endOffset(), mem_hdr::freeDataUpto(), mem_hdr::lowestOffset(), mem_hdr::nodeToRecieve(), SplayNode< V >::splay(), and testSplayOfNodes().
◆ left
Definition at line 28 of file splay.h.
Referenced by SplayConstIterator< V >::addLeftPath(), SplayNode< V >::insert(), SplayNode< V >::remove(), and SplayNode< V >::splay().
◆ right
Definition at line 29 of file splay.h.
Referenced by SplayConstIterator< V >::advance(), SplayNode< V >::insert(), SplayNode< V >::remove(), and SplayNode< V >::splay().
The documentation for this class was generated from the following file:
- include/splay.h