Files Classes Functions Hierarchy
#include <hashtable2.h>
Public Member Functions | |
| hashtable2 (uintc bucketsize_, HFN fn_) | |
| Pre allocate the bucket size. | |
| ~hashtable2 () | |
| Memory cleanup. | |
| void | insert (T const &val) |
| Insert a value into the hash table. | |
| template<typename K > | |
| void | insert (K const *ibeg, K const *iend) |
| Insert a container into the hash table. | |
hashfunction01 hfn(8); hashtable2<int,hashfunction01> h(60,hfn); h.insert(&v[0],&v[0]+vsz); ... if (h.contains(5)) ...
Definition at line 24 of file hashtable2.h.
| hashtable2< T, HFN >::hashtable2 | ( | uintc | bucketsize_, | |
| HFN | fn_ | |||
| ) | [inline] |
Pre allocate the bucket size.
Definition at line 35 of file hashtable2.h.
00039 : hashtable<T,HFN>(bucketsize_,fn_) {}
| hashtable2< T, HFN >::~hashtable2 | ( | ) | [inline] |
Memory cleanup.
Definition at line 57 of file hashtable2.h.
00058 { 00059 uintc imax=bucketlinks.size(); 00060 for (uint i=0; i<imax; ++i) 00061 { 00062 delete[] data[i]; 00063 delete[] bucketlinks[i]; 00064 } 00065 bucketlinks.clear(); 00066 }
| void hashtable2< T, HFN >::insert | ( | K const * | ibeg, | |
| K const * | iend | |||
| ) | [inline] |
Insert a container into the hash table.
Definition at line 79 of file hashtable2.h.
References hashtable2< T, HFN >::insert().
| void hashtable2< T, HFN >::insert | ( | T const & | val | ) | [inline] |
Insert a value into the hash table.
Definition at line 69 of file hashtable2.h.
Referenced by hashtable2< T, HFN >::insert(), and hashtabletest::test04unit().
00070 { 00071 uintc sz=data.size(); 00072 data.push_back( new T(val) ); 00073 bucketlinks.push_back( new bucketlink<T>( data[sz] ) ); 00074 hashtable<T,HFN>::insert( bucketlinks[sz] ); 00075 }
1.5.8