Have added a new method; ClearItems(), which removes all items from the underlying hash table but does not destroy the table. This is much faster than simply enumerating all keys and removing the items individually.
The download link is at the bottom of this post.
==============================================
Update : 27/12/07.
Have added a new method; EnumKeys(), which allows the host application to iterate through all the keys (and all of the data) of the underlying hash table. This is useful if some of the fields being stored contain pointers to memory which needs to be freed by the host application etc.
Have added a second demo program to show this method being used and also there is a detailed explanation of this method in the user guide.
The download link is at the bottom of this post.
==============================================
Hi,
right this little offering is not merely a conversion to OOP of my previous hash table utility (http://www.purebasic.fr/english/viewtopic.php?t=24683)
but represents a far more refined and way way more powerful cross-platform 'engine'.
It has grown out of a need of mine for a hash table capable of handling huge amounts of data - and this is it!

I've included quite a comprehensive user guide with this class and so will only sketch out the main differences between this library and my previous one for hash tables etc. Indeed, if you are unsure what a hash table is and how it can be used, then there is a short and unintelligible (

- This new engine allows you to store any kind of data within a hash table; strings, structures, pointers to other hash tables etc. All strings are freed automatically etc. (The old hash table could only store a single 32-bit value in each item.)
- Far less memory overhead per item stored.
Byte for byte, there is a saving of roughly 12 bytes per item (if storing just single 32-bit values etc), which is a lot when you scale this up! - Faster access to individual items.
My previous engine used a global linked list to store all the data from ALL the hash tables in an application. That is, if you had 10 hash tables, then all the data for all of these tables was stored in the same linked list! This was convenient because of the need to handle collisions etc.
My new engine does not use any linked lists at all. Instead, all items sharing the same hash ('collisions') are bundled into an ordered array and are subsequently retrieved through a combination of the gerenated hash code + a binary search! Very fast! - Optional protection for multithreaded access to individual hash table objects.

The download includes all the source, a demo + the user guide. It also includes the source to my 'OOP array class' (http://www.purebasic.fr/english/viewtopic.php?t=29506) as this is required by the hash table class.
(Extract the zip whilst 'using folder names' and it should run straight out of the box. That, or your money back!

Download
Regards.