Class intrusive_hash_map

Synopsis

#include <include/EASTL/intrusive_hash_map.h>

template <typename Key, typename T, size_t bucketCount, typename Hash = eastl::hash<Key>, typename Equal = eastl::equal_to<Key> >
class intrusive_hash_map : public intrusive_hashtable<Key, T, Hash, Equal, bucketCount, false, true>

Description

intrusive_hash_map

Template parameters: Key The key object (key in the key/value pair). T must contain a member of type Key named mKey. T The type of object the map holds (a.k.a. value). bucketCount The number of buckets to use. Best if it's a prime number. Hash Hash function. See functional.h for examples of hash functions. Equal Equality testing predicate; tells if two elements are equal.

Mentioned in

Inheritance

Ancestors: intrusive_hashtable

Methods

intrusive_hash_map

Source

Lines 32-49 in include/EASTL/intrusive_hash_map.h.

template <typename Key, typename T, size_t bucketCount, typename Hash = eastl::hash<Key>, typename Equal = eastl::equal_to<Key> >
class intrusive_hash_map : public intrusive_hashtable<Key, T, Hash, Equal, bucketCount, false, true>
{
public:
    typedef intrusive_hashtable<Key, T, Hash, Equal, bucketCount, false, true>  base_type;
    typedef intrusive_hash_map<Key, T, bucketCount, Hash, Equal>                this_type;
public:
    explicit intrusive_hash_map(const Hash& h = Hash(), const Equal& eq = Equal())
        : base_type(h, eq)
    {
        // Empty
    }
    // To consider: Is this feasible, given how initializer_list works by creating a temporary array? Even if it is feasible, is it a good idea?
    //intrusive_hash_map(std::initializer_list<value_type> ilist);
}; // intrusive_hash_map





Add Discussion as Guest

Log in