#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 *=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<typename ValueVisitor >
void visit (ValueVisitor &) const
 left-to-right visit of all stored Values More...
 
template<class Visitor >
void visitEach (Visitor &visitor) const
 
template<class Visitor >
void visit (Visitor &visitor) const
 
template<class FindValue >
Splay< V >::Value const * find (FindValue const &value, int(*compare)(FindValue const &a, Value const &b)) const
 

Static Public Member Functions

static void DefaultFree (Value &v)
 

Private Member Functions

template<typename NodeVisitor >
void visitEach (NodeVisitor &) const
 left-to-right walk through all nodes More...
 

Private Attributes

SplayNode< V > * head
 
size_t elements
 

Detailed Description

template<class V>
class Splay< V >

Definition at line 49 of file splay.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 56 of file splay.h.

◆ iterator

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

Definition at line 55 of file splay.h.

◆ SPLAYCMP

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

Definition at line 53 of file splay.h.

◆ SPLAYFREE

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

Definition at line 54 of file splay.h.

◆ Value

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

Definition at line 52 of file splay.h.

Constructor & Destructor Documentation

◆ Splay()

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

Definition at line 60 of file splay.h.

Member Function Documentation

◆ begin()

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

Definition at line 384 of file splay.h.

References head.

Referenced by testHdrVisit().

◆ DefaultFree()

template<class V >
static void Splay< V >::DefaultFree ( Value v)
inlinestatic

Definition at line 58 of file splay.h.

◆ destroy()

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

◆ empty()

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

Definition at line 76 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 391 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 303 of file splay.h.

References head, and splayLastResult.

◆ finish()

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

Definition at line 355 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 332 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() [1/2]

template<class V >
template<typename ValueVisitor >
void Splay< V >::visit ( ValueVisitor &  ) const

◆ visit() [2/2]

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

Definition at line 294 of file splay.h.

◆ visitEach() [1/2]

template<class V >
template<typename NodeVisitor >
void Splay< V >::visitEach ( NodeVisitor &  ) const
private

◆ visitEach() [2/2]

template<class V >
template<class Visitor >
void Splay< V >::visitEach ( Visitor &  visitor) const

Definition at line 235 of file splay.h.

References cur, and head.

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