DSOHash< VT > Class Template Reference

direct hash with string keys and object ("Ref") values More...

#include <dso_hash.h>

Inheritance diagram for DSOHash< VT >:
DHashBase< zmm::String, struct dso_hash_slot< VT > > zmm::Object

Public Member Functions

 DSOHash (int capacity)
virtual ~DSOHash ()
virtual int hashCode (zmm::String key)
virtual bool match (zmm::String key, struct dso_hash_slot< VT > *slot)
virtual bool isEmptySlot (struct dso_hash_slot< VT > *slot)
virtual bool isDeletedSlot (struct dso_hash_slot< VT > *slot)
void clear ()
bool remove (zmm::String key)
void put (zmm::String key, zmm::Ref< VT > value)
void put (zmm::String key, hash_slot_t destSlot, zmm::Ref< VT > value)
zmm::Ref< VT > get (zmm::String key)
zmm::Ref< VT > get (zmm::String key, hash_slot_t *destSlot)
void zero ()
int size ()
int baseTypeHashCode (unsigned int key)
int secondaryHashCode (int primary)
bool search (zmm::Stringkey, struct dso_hash_slot< VT > **retSlot)
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Member Functions

void releaseData ()

Protected Attributes

zmm::StringBasedeletedKey
int capacity
int count
struct dso_hash_slot< VT > * data
mt_atomic_t _ref_count
pthread_mutex_t mutex

Detailed Description

template<typename VT>
class DSOHash< VT >

direct hash with string keys and object ("Ref") values

Definition at line 46 of file dso_hash.h.


Constructor & Destructor Documentation

template<typename VT>
DSOHash< VT >::DSOHash ( int  capacity  )  [inline]

Definition at line 49 of file dso_hash.h.

template<typename VT>
virtual DSOHash< VT >::~DSOHash (  )  [inline, virtual]

Definition at line 54 of file dso_hash.h.


Member Function Documentation

int DHashBase< zmm::String , struct dso_hash_slot< VT > >::baseTypeHashCode ( unsigned int  key  )  [inline, inherited]

Definition at line 74 of file direct_hash_base.h.

Referenced by DSOHash< zmm::Array< CacheObject > >::hashCode().

template<typename VT>
void DSOHash< VT >::clear (  )  [inline]

Definition at line 94 of file dso_hash.h.

template<typename VT>
zmm::Ref<VT> DSOHash< VT >::get ( zmm::String  key,
hash_slot_t destSlot 
) [inline]

Definition at line 153 of file dso_hash.h.

template<typename VT>
zmm::Ref<VT> DSOHash< VT >::get ( zmm::String  key  )  [inline]

Definition at line 141 of file dso_hash.h.

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file object.cc.

References zmm::Object::_ref_count, and atomic_get().

template<typename VT>
virtual int DSOHash< VT >::hashCode ( zmm::String  key  )  [inline, virtual]

Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.

Definition at line 77 of file dso_hash.h.

template<typename VT>
virtual bool DSOHash< VT >::isDeletedSlot ( struct dso_hash_slot< VT > *  slot  )  [inline, virtual]

Reimplemented from DHashBase< zmm::String, struct dso_hash_slot< VT > >.

Definition at line 89 of file dso_hash.h.

template<typename VT>
virtual bool DSOHash< VT >::isEmptySlot ( struct dso_hash_slot< VT > *  slot  )  [inline, virtual]

Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.

Definition at line 85 of file dso_hash.h.

template<typename VT>
virtual bool DSOHash< VT >::match ( zmm::String  key,
struct dso_hash_slot< VT > *  slot 
) [inline, virtual]

Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.

Definition at line 81 of file dso_hash.h.

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file object.cc.

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file object.cc.

References MALLOC.

template<typename VT>
void DSOHash< VT >::put ( zmm::String  key,
hash_slot_t  destSlot,
zmm::Ref< VT >  value 
) [inline]

Definition at line 118 of file dso_hash.h.

template<typename VT>
void DSOHash< VT >::put ( zmm::String  key,
zmm::Ref< VT >  value 
) [inline]

Definition at line 112 of file dso_hash.h.

Referenced by DSOHash< zmm::Array< CacheObject > >::put().

void Object::release (  )  [inherited]
template<typename VT>
void DSOHash< VT >::releaseData (  )  [inline, protected]
template<typename VT>
bool DSOHash< VT >::remove ( zmm::String  key  )  [inline]

Definition at line 100 of file dso_hash.h.

void Object::retain (  )  [inherited]
bool DHashBase< zmm::String , struct dso_hash_slot< VT > >::search ( zmm::String  key,
struct dso_hash_slot< VT > **  retSlot 
) [inline, inherited]
int DHashBase< zmm::String , struct dso_hash_slot< VT > >::secondaryHashCode ( int  primary  )  [inline, inherited]

Definition at line 103 of file direct_hash_base.h.

int DHashBase< zmm::String , struct dso_hash_slot< VT > >::size (  )  [inline, inherited]

Definition at line 60 of file direct_hash_base.h.

void DHashBase< zmm::String , struct dso_hash_slot< VT > >::zero (  )  [inline, inherited]

Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
int DHashBase< zmm::String , struct dso_hash_slot< VT > >::capacity [protected, inherited]
int DHashBase< zmm::String , struct dso_hash_slot< VT > >::count [protected, inherited]
struct dso_hash_slot< VT > * DHashBase< zmm::String , struct dso_hash_slot< VT > >::data [protected, inherited]
template<typename VT>
zmm::StringBase* DSOHash< VT >::deletedKey [protected]
pthread_mutex_t zmm::Object::mutex [protected, inherited]

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

Generated on Fri Mar 26 20:16:56 2010 for MediaTomb by  doxygen 1.6.1