#include <splay.h>

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

Public Types

typedef V Value
 
typedef int SPLAYCMP(Value const &a, Value const &b)
 
typedef void SPLAYFREE(Value &)
 
typedef SplayIterator< V > iterator
 
typedef const SplayConstIterator< V > const_iterator
 

Public Member Functions

 Splay ()
 
template<class FindValue >
Value const * find (FindValue const &, int(*compare)(FindValue const &a, Value const &b)) const
 
void insert (Value const &, SPLAYCMP *compare)
 
void remove (Value const &, SPLAYCMP *compare)
 
void destroy (SPLAYFREE *=SplayNode< V >::DefaultFree)
 
SplayNode< V > const * start () const
 
SplayNode< V > const * finish () const
 
size_t size () const
 
bool empty () const
 
const_iterator begin () const
 
const_iterator end () const
 
template<class Visitor >
void visit (Visitor &v) const
 recursively visit all nodes, in left-to-right order More...
 
template<class FindValue >
Splay< V >::Value const * find (FindValue const &value, int(*compare)(FindValue const &a, Value const &b)) const
 

Private Attributes

SplayNode< V > * head
 
size_t elements
 

Detailed Description

template<class V>
class Splay< V >

Definition at line 55 of file splay.h.

Member Typedef Documentation

◆ const_iterator

template<class V >
typedef const SplayConstIterator<V> Splay< V >::const_iterator

Definition at line 62 of file splay.h.

◆ iterator

template<class V >
typedef SplayIterator<V> Splay< V >::iterator

Definition at line 61 of file splay.h.

◆ SPLAYCMP

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

Definition at line 59 of file splay.h.

◆ SPLAYFREE

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

Definition at line 60 of file splay.h.

◆ Value

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

Definition at line 58 of file splay.h.

Constructor & Destructor Documentation

◆ Splay()

template<class V >
Splay< V >::Splay ( )
inline

Definition at line 63 of file splay.h.

Member Function Documentation

◆ begin()

template<class V >
const SplayConstIterator< V > Splay< V >::begin

Definition at line 352 of file splay.h.

References head.

Referenced by testHdrVisit().

◆ destroy()

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

◆ empty()

template<class V >
bool Splay< V >::empty ( ) const
inline

Definition at line 79 of file splay.h.

References Splay< V >::size().

Referenced by ACLDomainData::empty(), ACLHTTPStatus::empty(), and ACLIP::empty().

◆ end()

template<class V >
const SplayConstIterator< V > Splay< V >::end

Definition at line 359 of file splay.h.

Referenced by testHdrVisit().

◆ find() [1/2]

template<class V >
template<class FindValue >
Value const * Splay< V >::find ( FindValue const &  ,
int(*)(FindValue const &a, Value const &b)  compare 
) const

◆ find() [2/2]

template<class V >
template<class FindValue >
Splay< V >::Value const * Splay< V >::find ( FindValue const &  value,
int(*)(FindValue const &a, Value const &b)  compare 
) const

Definition at line 271 of file splay.h.

References head, and splayLastResult.

◆ finish()

template<class V >
SplayNode< V > const * Splay< V >::finish

Definition at line 323 of file splay.h.

References head.

Referenced by mem_hdr::dump(), mem_hdr::endOffset(), mem_hdr::freeDataUpto(), main(), and testSplayOfNodes().

◆ insert()

template<class V >
void Splay< V >::insert ( Value const &  value,
SPLAYCMP compare 
)

◆ remove()

template<class V >
void Splay< V >::remove ( Value const &  value,
SPLAYCMP compare 
)

Definition at line 300 of file splay.h.

References head.

Referenced by MemChunk::~MemChunk(), and mem_hdr::unlink().

◆ size()

template<class V >
size_t Splay< V >::size

◆ start()

template<class V >
SplayNode< V > const * Splay< V >::start

◆ visit()

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

Definition at line 262 of file splay.h.

References head.

Referenced by mem_hdr::debugDump(), ACLDomainData::dump(), ACLHTTPStatus::dump(), and ACLIP::dump().

Member Data Documentation

◆ elements

template<class V >
size_t Splay< V >::elements
private

Definition at line 90 of file splay.h.

◆ head

template<class V >
SplayNode<V>* Splay< V >::head
mutableprivate

Definition at line 89 of file splay.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors