template class CCL::PointerHashMap

#include <hashmap.h>

template <class TValue>
class PointerHashMap: public Core::HashMap
{
public:
    // typedefs

    typedef HashMapIterator <const void*, TValue> Iterator;
    typedef HashMap <constvoid*, TValue>::TAssociation Association;

    // construction

    PointerHashMap (int size = 512, HashFunc hashFunc = hashFunction);

    // methods

    static int hashFunction (const void*const& key, int size);
};

Inherited Members

public:
    // typedefs

    typedef KeyValue <TKey, TValue> TAssociation;
    typedef Vector <TAssociation> TList;
    typedef VectorIterator <TAssociation> TIterator;

    typedef int  (*HashFunc)(
        const TKey &key,
        int size
        );

    // methods

    HashMap& operator = (const HashMap& other);
    bool isEmpty () const;
    int count () const;
    void add (const TKey& key, const TValue& value);
    bool remove (const TKey& key);
    bool replaceValue (const TKey& key, const TValue& value);
    void removeAll ();
    const TValue& lookup (const TKey& key) const;
    bool get (TValue& value, const TKey& key) const;
    bool contains (const TKey& key) const;
    bool getKey (TKey& key, const TValue& value) const;
    RangeIterator <HashMap <TKey, TValue>, HashMapIterator <TKey, TValue>, TValue> begin () const;
    RangeIterator <HashMap <TKey, TValue>, HashMapIterator <TKey, TValue>, TValue> end () const;