
#include <ckhashtable.h>

Public Member Functions | |
| CkHashtableLayout (int keySize, int emptyOffset, int objectOffset, int objectSize, int entryLength) | |
| int | entrySize (void) const |
| int | keySize (void) const |
| int | objectSize (void) const |
| char * | getKey (char *entry) const |
| Given an entry pointer, return a pointer to the key. | |
| char * | getObject (char *entry) const |
| Given an entry pointer, return a pointer to the object. | |
| char | isEmpty (char *entry) const |
| Is this entry empty? | |
| void | empty (char *entry) const |
| Mark this entry as empty. | |
| void | fill (char *entry) const |
| Mark this entry as full. | |
| char * | nextEntry (char *entry) const |
| Move to the next entry. | |
| char * | entryFromKey (char *key) const |
| Get entry pointer from key pointer. | |
| char * | entryFromObject (char *obj) const |
| Get entry pointer from object pointer. | |
Private Attributes | |
| int | size |
| Size of entire table entry, at least ks+os. | |
| int | ks |
| Key byte size (offset is always zero). | |
| int | po |
| "empty bit" offset (size is always 1) | |
| int | oo |
| int | os |
| Object byte offset and size. | |
Nobody should ever use this class directly; use CkHashtableT or CkHashtableTslow instead.
"key" is a user-defined type, used as the unique object identifier. The key is assumed to begin at the start of the entry. "empty" is a character, set to 1 if this entry in the table is unused, zero otherwise; the "empty" field must not overlap either of the other fields. "object" is the thing the table stores; it is of a user-defined type and may overlap "key".
| key | empty | gap? | object | gap? | == | <------- hashtable entry --------> |
Definition at line 151 of file ckhashtable.h.
| CkHashtableLayout::CkHashtableLayout | ( | int | keySize, | |
| int | emptyOffset, | |||
| int | objectOffset, | |||
| int | objectSize, | |||
| int | entryLength | |||
| ) | [inline] |
Definition at line 157 of file ckhashtable.h.
| int CkHashtableLayout::entrySize | ( | void | ) | const [inline] |
Definition at line 165 of file ckhashtable.h.
References size.
Referenced by CkHashtable::buildTable(), CkHashtableIterator::entry(), CkHashtable::entry(), and CkHashtable::rehash().

| int CkHashtableLayout::keySize | ( | void | ) | const [inline] |
Definition at line 166 of file ckhashtable.h.
References ks.
Referenced by CkHashtable::findEntry(), and CkHashtable::findKey().

| int CkHashtableLayout::objectSize | ( | void | ) | const [inline] |
| char* CkHashtableLayout::getKey | ( | char * | entry | ) | const [inline] |
Given an entry pointer, return a pointer to the key.
Definition at line 171 of file ckhashtable.h.
Referenced by CkHashtable::findEntry(), CkHashtable::findKey(), CkHashtableIterator::next(), CkHashtable::put(), CkHashtable::rehash(), and CkHashtable::remove().

| char* CkHashtableLayout::getObject | ( | char * | entry | ) | const [inline] |
Given an entry pointer, return a pointer to the object.
Definition at line 173 of file ckhashtable.h.
References oo.
Referenced by CkHashtableT< intdual, int >::get(), CkHashtable::get(), CkHashtableT< intdual, int >::getPointer(), CkHashtableT< intdual, int >::getRef(), CkHashtableIterator::next(), and CkHashtable::put().

| char CkHashtableLayout::isEmpty | ( | char * | entry | ) | const [inline] |
Is this entry empty?
Definition at line 176 of file ckhashtable.h.
References po.
Referenced by CkHashtable::findEntry(), CkHashtable::findKey(), CkHashtableT< intdual, int >::get(), CkHashtableT< intdual, int >::getPointer(), CkHashtableIterator::hasNext(), CkHashtableIterator::next(), CkHashtable::put(), CkHashtable::rehash(), and CkHashtable::remove().

| void CkHashtableLayout::empty | ( | char * | entry | ) | const [inline] |
Mark this entry as empty.
Definition at line 178 of file ckhashtable.h.
References po.
Referenced by CkHashtable::buildTable(), CkHashtable::empty(), and CkHashtable::remove().

| void CkHashtableLayout::fill | ( | char * | entry | ) | const [inline] |
Mark this entry as full.
Definition at line 180 of file ckhashtable.h.
References po.
Referenced by CkHashtable::put().

| char* CkHashtableLayout::nextEntry | ( | char * | entry | ) | const [inline] |
| char* CkHashtableLayout::entryFromKey | ( | char * | key | ) | const [inline] |
Get entry pointer from key pointer.
Definition at line 186 of file ckhashtable.h.
Referenced by CkHashtable::remove().

| char* CkHashtableLayout::entryFromObject | ( | char * | obj | ) | const [inline] |
int CkHashtableLayout::size [private] |
Size of entire table entry, at least ks+os.
Definition at line 152 of file ckhashtable.h.
Referenced by entrySize(), and nextEntry().
int CkHashtableLayout::ks [private] |
Key byte size (offset is always zero).
Definition at line 153 of file ckhashtable.h.
Referenced by keySize().
int CkHashtableLayout::po [private] |
int CkHashtableLayout::oo [private] |
int CkHashtableLayout::os [private] |
Object byte offset and size.
Definition at line 155 of file ckhashtable.h.
Referenced by objectSize().
1.5.5