Direct hash with string keys and base type values. More...
#include <dsb_hash.h>
Public Member Functions | |
| DSBHash (int capacity) | |
| virtual | ~DSBHash () |
| void | releaseData () |
| virtual int | hashCode (zmm::String key) |
| virtual bool | match (zmm::String key, struct dsb_hash_slot< VT > *slot) |
| virtual bool | isEmptySlot (struct dsb_hash_slot< VT > *slot) |
| void | clear () |
| void | put (zmm::String key, VT value) |
| void | put (zmm::String key, hash_slot_t destSlot, VT value) |
| VT | get (zmm::String key) |
| VT | get (zmm::String key, hash_slot_t *destSlot) |
| void | zero () |
| int | size () |
| virtual bool | isDeletedSlot (struct dsb_hash_slot< VT > *slot) |
| int | baseTypeHashCode (unsigned int key) |
| int | secondaryHashCode (int primary) |
| bool | search (zmm::Stringkey, struct dsb_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 Attributes | |
| int | capacity |
| int | count |
| struct dsb_hash_slot< VT > * | data |
| mt_atomic_t | _ref_count |
| pthread_mutex_t | mutex |
Direct hash with string keys and base type values.
Definition at line 47 of file dsb_hash.h.
Definition at line 50 of file dsb_hash.h.
References DHashBase< zmm::String, struct dsb_hash_slot< VT > >::zero().
Definition at line 54 of file dsb_hash.h.
References DSBHash< VT >::releaseData().
| int DHashBase< zmm::String , struct dsb_hash_slot< VT > >::baseTypeHashCode | ( | unsigned int | key | ) | [inline, inherited] |
Definition at line 74 of file direct_hash_base.h.
| void DSBHash< VT >::clear | ( | ) | [inline] |
Definition at line 82 of file dsb_hash.h.
References DSBHash< VT >::releaseData(), and DHashBase< zmm::String, struct dsb_hash_slot< VT > >::zero().
| VT DSBHash< VT >::get | ( | zmm::String | key, | |
| hash_slot_t * | destSlot | |||
| ) | [inline] |
Definition at line 134 of file dsb_hash.h.
References dsb_hash_slot< VT >::key, nil, and DHashBase< zmm::String, struct dsb_hash_slot< VT > >::search().
| VT DSBHash< VT >::get | ( | zmm::String | key | ) | [inline] |
Definition at line 122 of file dsb_hash.h.
References dsb_hash_slot< VT >::key, nil, DHashBase< zmm::String, struct dsb_hash_slot< VT > >::search(), and dsb_hash_slot< VT >::value.
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| virtual int DSBHash< VT >::hashCode | ( | zmm::String | key | ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dsb_hash_slot< VT > >.
Definition at line 69 of file dsb_hash.h.
References stringHash().
| virtual bool DHashBase< zmm::String , struct dsb_hash_slot< VT > >::isDeletedSlot | ( | struct dsb_hash_slot< VT > * | slot | ) | [inline, virtual, inherited] |
Definition at line 69 of file direct_hash_base.h.
| virtual bool DSBHash< VT >::isEmptySlot | ( | struct dsb_hash_slot< VT > * | slot | ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dsb_hash_slot< VT > >.
Definition at line 77 of file dsb_hash.h.
References dsb_hash_slot< VT >::key, and NULL.
| virtual bool DSBHash< VT >::match | ( | zmm::String | key, | |
| struct dsb_hash_slot< VT > * | slot | |||
| ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dsb_hash_slot< VT > >.
Definition at line 73 of file dsb_hash.h.
References zmm::String::c_str(), zmm::StringBase::data, and dsb_hash_slot< VT >::key.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void DSBHash< VT >::put | ( | zmm::String | key, | |
| hash_slot_t | destSlot, | |||
| VT | value | |||
| ) | [inline] |
Definition at line 107 of file dsb_hash.h.
References DHashBase< zmm::String, struct dsb_hash_slot< VT > >::count, zmm::String::getBase(), dsb_hash_slot< VT >::key, NULL, zmm::Object::retain(), and dsb_hash_slot< VT >::value.
| void DSBHash< VT >::put | ( | zmm::String | key, | |
| VT | value | |||
| ) | [inline] |
Definition at line 101 of file dsb_hash.h.
References DHashBase< zmm::String, struct dsb_hash_slot< VT > >::search().
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| void DSBHash< VT >::releaseData | ( | ) | [inline] |
Definition at line 58 of file dsb_hash.h.
References DHashBase< zmm::String, struct dsb_hash_slot< VT > >::capacity, DHashBase< zmm::String, struct dsb_hash_slot< VT > >::data, dsb_hash_slot< VT >::key, and zmm::Object::release().
Referenced by DSBHash< VT >::clear(), and DSBHash< VT >::~DSBHash().
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| bool DHashBase< zmm::String , struct dsb_hash_slot< VT > >::search | ( | zmm::String | key, | |
| struct dsb_hash_slot< VT > ** | retSlot | |||
| ) | [inline, inherited] |
Definition at line 113 of file direct_hash_base.h.
Referenced by DSBHash< VT >::get(), and DSBHash< VT >::put().
| int DHashBase< zmm::String , struct dsb_hash_slot< VT > >::secondaryHashCode | ( | int | primary | ) | [inline, inherited] |
Definition at line 103 of file direct_hash_base.h.
| int DHashBase< zmm::String , struct dsb_hash_slot< VT > >::size | ( | ) | [inline, inherited] |
Definition at line 60 of file direct_hash_base.h.
| void DHashBase< zmm::String , struct dsb_hash_slot< VT > >::zero | ( | ) | [inline, inherited] |
Definition at line 55 of file direct_hash_base.h.
Referenced by DSBHash< VT >::clear(), and DSBHash< VT >::DSBHash().
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
int DHashBase< zmm::String , struct dsb_hash_slot< VT > >::capacity [protected, inherited] |
Definition at line 41 of file direct_hash_base.h.
Referenced by DSBHash< VT >::releaseData().
int DHashBase< zmm::String , struct dsb_hash_slot< VT > >::count [protected, inherited] |
Definition at line 42 of file direct_hash_base.h.
Referenced by DSBHash< VT >::put().
struct dsb_hash_slot< VT > * DHashBase< zmm::String , struct dsb_hash_slot< VT > >::data [protected, inherited] |
Definition at line 43 of file direct_hash_base.h.
Referenced by DSBHash< VT >::releaseData().
pthread_mutex_t zmm::Object::mutex [protected, inherited] |
Reimplemented in AutoscanList, AutoscanInotify, CachedURL, Dictionary_r, DVDNavReader, IOHandlerBufferHelper, ReentrantArray< T >, SingletonManager, Singleton< T >, StorageCache, MutexAutolock, Cond, ThreadExecutor, Singleton< UpdateManager >, Singleton< Timer >, Singleton< ContentDirectoryService >, Singleton< ConfigManager >, Singleton< Server >, Singleton< Runtime >, Singleton< ContentManager >, Singleton< ConnectionManagerService >, Singleton< PlayHook >, Singleton< Storage >, and Singleton< SessionManager >.
Definition at line 56 of file object.h.
Referenced by zmm::Object::Object(), zmm::Object::release(), zmm::Object::retain(), and zmm::Object::~Object().
1.6.1