Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

hash::ItemTableSingle< ItemType > Class Template Reference

Hash table for singly linked buckets with items of fixed size. More...

#include <itemtables.h>

Inheritance diagram for hash::ItemTableSingle< ItemType >:

hash::TableSingle< ItemBucketSingle< ItemType > > hash::AbstractTable< ItemBucketSingle< ItemType >, SingleBucket_t, SingleBucket< ItemBucketSingle< ItemType > > > List of all members.

Public Member Functions

 ItemTableSingle (uint32_t sizePower2, bool aggressive)
bool hasItem (const ItemType &item, uint32_t hashValue)
template<class Alloc>
ItemBucketSingle< ItemType > * addItem (const ItemType &item, uint32_t hashValue, Alloc *alloc)
 Add an item to the hash table.
ItemBucketSingle< ItemType > * addNewItem (const ItemType &item, uint32_t hashValue)
 Add an item to the hash table.

Detailed Description

template<class ItemType>
class hash::ItemTableSingle< ItemType >

Hash table for singly linked buckets with items of fixed size.

info is used to store the hash value.


Constructor & Destructor Documentation

template<class ItemType>
hash::ItemTableSingle< ItemType >::ItemTableSingle uint32_t  sizePower2,
bool  aggressive
[inline]
 

See also:
TableSingle


Member Function Documentation

template<class ItemType>
template<class Alloc>
ItemBucketSingle<ItemType>* hash::ItemTableSingle< ItemType >::addItem const ItemType &  item,
uint32_t  hashValue,
Alloc *  alloc
[inline]
 

Add an item to the hash table.

Returns:
added bucket or existing bucket that contains this item. ItemType needs the == and the = operators.
Parameters:
item,: item to add to the hash table.
hashValue,: hash associated to the item.
alloc,: an allocator having a allocate(uint) to allocate in int units.

template<class ItemType>
ItemBucketSingle<ItemType>* hash::ItemTableSingle< ItemType >::addNewItem const ItemType &  item,
uint32_t  hashValue
[inline]
 

Add an item to the hash table.

Returns:
added bucket or existing bucket that contains this item. ItemType needs the == and the = operators.
Parameters:
item,: item to add to the hash table.
hashValue,: hash associated to the item. NOTE: bucket is allocated with new so you need to call resetDelete() to deallocate all properly.

template<class ItemType>
bool hash::ItemTableSingle< ItemType >::hasItem const ItemType &  item,
uint32_t  hashValue
[inline]
 

Returns:
true if the hash table has a given item. ItemType needs the == operator.
Parameters:
item,: item to test
hashValue,: hash value for the item.


The documentation for this class was generated from the following file:
Generated on Fri Jun 30 00:03:00 2006 for Module hash by  doxygen 1.4.2