#include <splay.h>

Inheritance diagram for SplayNode< V >:
Collaboration diagram for SplayNode< V >:

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)
 
void walk (SPLAYWALKEE *, void *callerState)
 
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

template<class V>
class SplayNode< V >

Definition at line 17 of file splay.h.

Member Typedef Documentation

◆ SPLAYCMP

template<class V>
typedef int SplayNode< V >::SPLAYCMP(Value const &a, Value const &b)

Definition at line 21 of file splay.h.

◆ SPLAYFREE

template<class V>
typedef void SplayNode< V >::SPLAYFREE(Value &)

Definition at line 22 of file splay.h.

◆ SPLAYWALKEE

template<class V>
typedef void SplayNode< V >::SPLAYWALKEE(Value const &nodedata, void *state)

Definition at line 23 of file splay.h.

◆ Value

template<class V>
typedef V SplayNode< V >::Value

Definition at line 20 of file splay.h.

Constructor & Destructor Documentation

◆ SplayNode()

template<class V >
SplayNode< V >::SplayNode ( Value const &  someData)

Definition at line 97 of file splay.h.

Member Function Documentation

◆ DefaultFree()

template<class V>
static void SplayNode< V >::DefaultFree ( Value aValue)
inlinestatic

Definition at line 24 of file splay.h.

◆ destroy()

template<class V >
void SplayNode< V >::destroy ( SPLAYFREE free_func = DefaultFree)

◆ finish()

template<class V >
SplayNode< V > const * SplayNode< V >::finish ( ) const

◆ insert()

template<class V >
SplayNode< V > * SplayNode< V >::insert ( Value  data,
SPLAYCMP compare 
)

◆ remove()

template<class V >
SplayNode< V > * SplayNode< V >::remove ( const Value  data,
SPLAYCMP compare 
)

Definition at line 149 of file splay.h.

◆ splay()

template<class V >
template<class FindValue >
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 200 of file splay.h.

Referenced by SplayNode< acl_httpstatus_data *>::insert(), and SplayNode< acl_httpstatus_data *>::remove().

◆ start()

template<class V >
SplayNode< V > const * SplayNode< V >::start ( ) const

◆ visit()

template<class V >
template<class Visitor >
void SplayNode< V >::visit ( Visitor &  v) const

◆ walk()

template<class V >
void SplayNode< V >::walk ( SPLAYWALKEE walkee,
void *  callerState 
)

Definition at line 101 of file splay.h.

Referenced by main(), and SplayNode< acl_httpstatus_data *>::walk().

Member Data Documentation

◆ data

◆ left

◆ right


The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors