|
Squid Web Cache master
|
#include <splay.h>
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 |
| const Value * | insert (const Value &, SPLAYCMP *) |
| 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 | |
| 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 | |
Private Attributes | |
| SplayNode< V > * | head |
| size_t | elements |
| typedef const SplayConstIterator<V> Splay< V >::const_iterator |
| typedef SplayIterator<V> Splay< V >::iterator |
| const SplayConstIterator< V > Splay< V >::begin | ( | ) | const |
| void Splay< V >::destroy | ( | SPLAYFREE * | free_func = DefaultFree | ) |
Definition at line 369 of file splay.h.
References head.
Referenced by ACLDomainData::~ACLDomainData(), ACLHTTPStatus::~ACLHTTPStatus(), ACLIP::~ACLIP(), mem_hdr::freeContent(), main(), and testSplayOfNodes().
|
inline |
Definition at line 78 of file splay.h.
References Splay< V >::size().
Referenced by ACLDomainData::empty(), ACLHTTPStatus::empty(), and ACLIP::empty().
| const SplayConstIterator< V > Splay< V >::end | ( | ) | const |
Definition at line 395 of file splay.h.
Referenced by testHdrVisit().
| Splay< V >::Value const * Splay< V >::find | ( | FindValue const & | value, |
| int(*)(FindValue const &a, Value const &b) | compare | ||
| ) | const |
Definition at line 305 of file splay.h.
References head, and splayLastResult.
Definition at line 359 of file splay.h.
References head.
Referenced by mem_hdr::dump(), mem_hdr::endOffset(), mem_hdr::freeDataUpto(), main(), and testSplayOfNodes().
| Splay< V >::Value const * Splay< V >::insert | ( | const Value & | value, |
| SPLAYCMP * | compare | ||
| ) |
If the given value matches a stored one, returns that matching value. Otherwise, stores the given unique value and returns nil.
Definition at line 320 of file splay.h.
References head.
Referenced by MemChunk::MemChunk(), mem_hdr::appendNode(), main(), Acl::SplayInserter< DataValue >::Merge(), and testSplayOfNodes().
Definition at line 336 of file splay.h.
References head.
Referenced by MemChunk::~MemChunk(), Acl::SplayInserter< DataValue >::Merge(), and mem_hdr::unlink().
Definition at line 381 of file splay.h.
Referenced by mem_hdr::copy(), Splay< V >::empty(), main(), mem_hdr::nodeToRecieve(), and mem_hdr::size().
Definition at line 349 of file splay.h.
References head.
Referenced by mem_hdr::dump(), mem_hdr::freeDataUpto(), mem_hdr::lowestOffset(), main(), mem_hdr::nodeToRecieve(), and testSplayOfNodes().
Referenced by mem_hdr::debugDump(), ACLDomainData::dump(), ACLHTTPStatus::dump(), and ACLIP::dump().
|
private |