Sierra Toolkit  Version of the Day
eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode > Class Template Reference

#include <hash_map_eastl.h>

Inheritance diagram for eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >:
Collaboration diagram for eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >:

Public Types

typedef hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false > base_type
 
typedef hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode > this_type
 
typedef base_type::size_type size_type
 
typedef base_type::key_type key_type
 
typedef T mapped_type
 
typedef base_type::value_type value_type
 
typedef base_type::allocator_type allocator_type
 
typedef base_type::node_type node_type
 
typedef base_type::insert_return_type insert_return_type
 
typedef base_type::iterator iterator
 
- Public Types inherited from eastl::hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false >
enum  
 
typedef Key key_type
 
typedef eastl::pair< const Key, T > value_type
 
typedef eastl::use_first< eastl::pair< const Key, T > > ::result_type mapped_type
 
typedef hash_code_base< Key, eastl::pair< const Key, T >, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, bCacheHashCode > hash_code_base_type
 
typedef hash_code_base_type::hash_code_t hash_code_t
 
typedef Allocator allocator_type
 
typedef Predicate key_equal
 
typedef ptrdiff_t difference_type
 
typedef eastl_size_t size_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef node_iterator< value_type, !bMutableIterators, bCacheHashCode > local_iterator
 
typedef node_iterator< value_type, true, bCacheHashCode > const_local_iterator
 
typedef hashtable_iterator< value_type, !bMutableIterators, bCacheHashCode > iterator
 
typedef hashtable_iterator< value_type, true, bCacheHashCode > const_iterator
 
typedef eastl::reverse_iterator< iteratorreverse_iterator
 
typedef eastl::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef hash_node< value_type, bCacheHashCode > node_type
 
typedef type_select< bUniqueKeys, eastl::pair< iterator, bool >, iterator >::type insert_return_type
 
typedef hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, bMutableIterators, bUniqueKeys > this_type
 
typedef prime_rehash_policy rehash_policy_type
 
typedef eastl::use_first< eastl::pair< const Key, T > > extract_key_type
 
typedef Hash h1_type
 
typedef mod_range_hashing h2_type
 
typedef default_ranged_hash h_type
 

Public Member Functions

 hash_multimap (const allocator_type &allocator=allocator_type(EASTL_DEFAULT_NAME_PREFIX " hash_multimap"))
 
 hash_multimap (size_type nBucketCount, const Hash &hashFunction=Hash(), const Predicate &predicate=Predicate(), const allocator_type &allocator=allocator_type(EASTL_DEFAULT_NAME_PREFIX " hash_multimap"))
 
template<typename ForwardIterator >
 hash_multimap (ForwardIterator first, ForwardIterator last, size_type nBucketCount=0, const Hash &hashFunction=Hash(), const Predicate &predicate=Predicate(), const allocator_type &allocator=allocator_type(EASTL_DEFAULT_NAME_PREFIX " hash_multimap"))
 
insert_return_type insert (const key_type &key)
 
- Public Member Functions inherited from eastl::hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false >
 hashtable (size_type nBucketCount, const Hash &, const mod_range_hashing &, const default_ranged_hash &, const Predicate &, const eastl::use_first< eastl::pair< const Key, T > > &, const allocator_type &allocator=allocator_type(EASTL_DEFAULT_NAME_PREFIX " hashtable"))
 
 hashtable (FowardIterator first, FowardIterator last, size_type nBucketCount, const Hash &, const mod_range_hashing &, const default_ranged_hash &, const Predicate &, const eastl::use_first< eastl::pair< const Key, T > > &, const allocator_type &allocator=allocator_type(EASTL_DEFAULT_NAME_PREFIX " hashtable"))
 
 hashtable (const hashtable &x)
 
allocator_type & get_allocator ()
 
void set_allocator (const allocator_type &allocator)
 
this_typeoperator= (const this_type &x)
 
void swap (this_type &x)
 
iterator begin ()
 
const_iterator begin () const
 
local_iterator begin (size_type n)
 
const_local_iterator begin (size_type n) const
 
iterator end ()
 
const_iterator end () const
 
local_iterator end (size_type)
 
const_local_iterator end (size_type) const
 
bool empty () const
 
size_type size () const
 
size_type bucket_count () const
 
size_type bucket_size (size_type n) const
 
float load_factor () const
 
const rehash_policy_typerehash_policy () const
 
void rehash_policy (const rehash_policy_type &rehashPolicy)
 
insert_return_type insert (const value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
void insert (InputIterator first, InputIterator last)
 
iterator erase (iterator position)
 
iterator erase (iterator first, iterator last)
 
reverse_iterator erase (reverse_iterator position)
 
reverse_iterator erase (reverse_iterator first, reverse_iterator last)
 
size_type erase (const key_type &k)
 
void clear ()
 
void clear (bool clearBuckets)
 
void reset ()
 
void rehash (size_type nBucketCount)
 
iterator find (const key_type &key)
 
const_iterator find (const key_type &key) const
 
iterator find_as (const U &u, UHash uhash, BinaryPredicate predicate)
 
const_iterator find_as (const U &u, UHash uhash, BinaryPredicate predicate) const
 
iterator find_as (const U &u)
 
const_iterator find_as (const U &u) const
 
iterator find_by_hash (hash_code_t c)
 
const_iterator find_by_hash (hash_code_t c) const
 
size_type count (const key_type &k) const
 
eastl::pair< iterator, iteratorequal_range (const key_type &k)
 
eastl::pair< const_iterator, const_iteratorequal_range (const key_type &k) const
 
bool validate () const
 
int validate_iterator (const_iterator i) const
 

Additional Inherited Members

- Static Public Attributes inherited from eastl::hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false >
static const bool kCacheHashCode
 
- Protected Member Functions inherited from eastl::hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false >
node_typeDoAllocateNode (const value_type &value)
 
node_typeDoAllocateNodeFromKey (const key_type &key)
 
void DoFreeNode (node_type *pNode)
 
void DoFreeNodes (node_type **pBucketArray, size_type)
 
node_type ** DoAllocateBuckets (size_type n)
 
void DoFreeBuckets (node_type **pBucketArray, size_type n)
 
eastl::pair< iterator, bool > DoInsertValue (const value_type &value, true_type)
 
iterator DoInsertValue (const value_type &value, false_type)
 
eastl::pair< iterator, bool > DoInsertKey (const key_type &key, true_type)
 
iterator DoInsertKey (const key_type &key, false_type)
 
void DoRehash (size_type nBucketCount)
 
node_typeDoFindNode (node_type *pNode, const key_type &k, hash_code_t c) const
 
node_typeDoFindNode (node_type *pNode, const U &u, BinaryPredicate predicate) const
 
node_typeDoFindNode (node_type *pNode, hash_code_t c) const
 
- Protected Attributes inherited from eastl::hashtable< Key, eastl::pair< const Key, T >, Allocator, eastl::use_first< eastl::pair< const Key, T > >, Predicate, Hash, mod_range_hashing, default_ranged_hash, prime_rehash_policy, bCacheHashCode, true, false >
node_type ** mpBucketArray
 
size_type mnBucketCount
 
size_type mnElementCount
 
prime_rehash_policy mRehashPolicy
 
allocator_type mAllocator
 

Detailed Description

template<typename Key, typename T, typename Hash = eastl::hash<Key>, typename Predicate = eastl::equal_to<Key>, typename Allocator = EASTLAllocatorType, bool bCacheHashCode = false>
class eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >

hash_multimap

Implements a hash_multimap, which is the same thing as a hash_map except that contained elements need not be unique. See the documentation for hash_set for details.

Definition at line 235 of file hash_map_eastl.h.

Constructor & Destructor Documentation

◆ hash_multimap() [1/3]

template<typename Key , typename T , typename Hash = eastl::hash<Key>, typename Predicate = eastl::equal_to<Key>, typename Allocator = EASTLAllocatorType, bool bCacheHashCode = false>
eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >::hash_multimap ( const allocator_type &  allocator = allocator_type( EASTL_DEFAULT_NAME_PREFIX " hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >" ))
inlineexplicit

hash_multimap

Default constructor.

Definition at line 263 of file hash_map_eastl.h.

◆ hash_multimap() [2/3]

template<typename Key , typename T , typename Hash = eastl::hash<Key>, typename Predicate = eastl::equal_to<Key>, typename Allocator = EASTLAllocatorType, bool bCacheHashCode = false>
eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >::hash_multimap ( size_type  nBucketCount,
const Hash &  hashFunction = Hash(),
const Predicate &  predicate = Predicate(),
const allocator_type &  allocator = allocator_type( EASTL_DEFAULT_NAME_PREFIX " hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >" ) 
)
inlineexplicit

hash_multimap

Constructor which creates an empty container, but start with nBucketCount buckets. We default to a small nBucketCount value, though the user really should manually specify an appropriate value in order to prevent memory from being reallocated.

Definition at line 277 of file hash_map_eastl.h.

◆ hash_multimap() [3/3]

template<typename Key , typename T , typename Hash = eastl::hash<Key>, typename Predicate = eastl::equal_to<Key>, typename Allocator = EASTLAllocatorType, bool bCacheHashCode = false>
template<typename ForwardIterator >
eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >::hash_multimap ( ForwardIterator  first,
ForwardIterator  last,
size_type  nBucketCount = 0,
const Hash &  hashFunction = Hash(),
const Predicate &  predicate = Predicate(),
const allocator_type &  allocator = allocator_type( EASTL_DEFAULT_NAME_PREFIX " hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >" ) 
)
inline

hash_multimap

An input bucket count of <= 1 causes the bucket count to be equal to the number of elements in the input range.

Definition at line 292 of file hash_map_eastl.h.

Member Function Documentation

◆ insert()

template<typename Key , typename T , typename Hash = eastl::hash<Key>, typename Predicate = eastl::equal_to<Key>, typename Allocator = EASTLAllocatorType, bool bCacheHashCode = false>
insert_return_type eastl::hash_multimap< Key, T, Hash, Predicate, Allocator, bCacheHashCode >::insert ( const key_type &  key)
inline

insert

This is an extension to the C++ standard. We insert a default-constructed element with the given key. The reason for this is that we can avoid the potentially expensive operation of creating and/or copying a mapped_type object on the stack.

Definition at line 307 of file hash_map_eastl.h.


The documentation for this class was generated from the following file: