DBBHash< KT, VT > Class Template Reference

Direct hash with base type keys and base type values. More...

#include <dbb_hash.h>

Inheritance diagram for DBBHash< KT, VT >:
DHashBase< KT, struct dbb_hash_slot< KT, VT > > zmm::Object

Public Member Functions

 DBBHash (int capacity, KT emptyKey)
virtual int hashCode (KT key)
virtual bool match (KT key, struct dbb_hash_slot< KT, VT > *slot)
virtual bool isEmptySlot (struct dbb_hash_slot< KT, VT > *slot)
void clear ()
void put (KT key, VT value)
void put (KT key, hash_slot_t destSlot, VT value)
bool get (KT key, VT *value)
bool get (KT key, hash_slot_t *destSlot, VT *value)
bool exists (KT key)
bool exists (KT key, hash_slot_t *destSlot)
void zero ()
int size ()
virtual bool isDeletedSlot (struct dbb_hash_slot< KT, VT > *slot)
int baseTypeHashCode (unsigned int key)
int secondaryHashCode (int primary)
bool search (KTkey, struct dbb_hash_slot< KT, 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 Attributes

KT emptyKey
int capacity
int count
struct dbb_hash_slot< KT, VT > * data
mt_atomic_t _ref_count
pthread_mutex_t mutex

Detailed Description

template<typename KT, typename VT>
class DBBHash< KT, VT >

Direct hash with base type keys and base type values.

Definition at line 45 of file dbb_hash.h.


Constructor & Destructor Documentation

template<typename KT , typename VT >
DBBHash< KT, VT >::DBBHash ( int  capacity,
KT  emptyKey 
) [inline]

Definition at line 50 of file dbb_hash.h.

References DBBHash< KT, VT >::clear().


Member Function Documentation

int DHashBase< KT , struct dbb_hash_slot< KT, VT > >::baseTypeHashCode ( unsigned int  key  )  [inline, inherited]

Definition at line 74 of file direct_hash_base.h.

Referenced by DBBHash< KT, VT >::hashCode().

template<typename KT , typename VT >
void DBBHash< KT, VT >::clear (  )  [inline]
template<typename KT , typename VT >
bool DBBHash< KT, VT >::exists ( KT  key,
hash_slot_t destSlot 
) [inline]
template<typename KT , typename VT >
bool DBBHash< KT, VT >::exists ( KT  key  )  [inline]
template<typename KT , typename VT >
bool DBBHash< KT, VT >::get ( KT  key,
hash_slot_t destSlot,
VT *  value 
) [inline]
template<typename KT , typename VT >
bool DBBHash< KT, VT >::get ( KT  key,
VT *  value 
) [inline]
int Object::getRefCount (  )  [inherited]

Definition at line 78 of file object.cc.

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

template<typename KT , typename VT >
virtual int DBBHash< KT, VT >::hashCode ( KT  key  )  [inline, virtual]
virtual bool DHashBase< KT , struct dbb_hash_slot< KT, VT > >::isDeletedSlot ( struct dbb_hash_slot< KT, VT > *  slot  )  [inline, virtual, inherited]

Definition at line 69 of file direct_hash_base.h.

template<typename KT , typename VT >
virtual bool DBBHash< KT, VT >::isEmptySlot ( struct dbb_hash_slot< KT, VT > *  slot  )  [inline, virtual]
template<typename KT , typename VT >
virtual bool DBBHash< KT, VT >::match ( KT  key,
struct dbb_hash_slot< KT, VT > *  slot 
) [inline, virtual]
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 KT , typename VT >
void DBBHash< KT, VT >::put ( KT  key,
hash_slot_t  destSlot,
VT  value 
) [inline]
template<typename KT , typename VT >
void DBBHash< KT, VT >::put ( KT  key,
VT  value 
) [inline]
void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
bool DHashBase< KT , struct dbb_hash_slot< KT, VT > >::search ( KT  key,
struct dbb_hash_slot< KT, VT > **  retSlot 
) [inline, inherited]
int DHashBase< KT , struct dbb_hash_slot< KT, VT > >::secondaryHashCode ( int  primary  )  [inline, inherited]

Definition at line 103 of file direct_hash_base.h.

int DHashBase< KT , struct dbb_hash_slot< KT, VT > >::size (  )  [inline, inherited]

Definition at line 60 of file direct_hash_base.h.

void DHashBase< KT , struct dbb_hash_slot< KT, VT > >::zero (  )  [inline, inherited]

Definition at line 55 of file direct_hash_base.h.

Referenced by DBBHash< KT, VT >::clear().


Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
int DHashBase< KT , struct dbb_hash_slot< KT, VT > >::capacity [protected, inherited]

Definition at line 41 of file direct_hash_base.h.

Referenced by DBBHash< KT, VT >::clear().

int DHashBase< KT , struct dbb_hash_slot< KT, VT > >::count [protected, inherited]

Definition at line 42 of file direct_hash_base.h.

Referenced by DBBHash< KT, VT >::clear(), and DBBHash< KT, VT >::put().

struct dbb_hash_slot< KT, VT > * DHashBase< KT , struct dbb_hash_slot< KT, VT > >::data [protected, inherited]

Definition at line 43 of file direct_hash_base.h.

Referenced by DBBHash< KT, VT >::clear().

template<typename KT , typename VT >
KT DBBHash< KT, VT >::emptyKey [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