BDE 4.14.0 Production release
|
#include <bslstl_hashtable.h>
Public Types | |
typedef HashTable< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > | HashTableType |
typedef HashTableType::AllocatorTraits::template rebind_traits< NodeType > | ReboundTraits |
typedef ReboundTraits::allocator_type | NodeAllocator |
typedef BidirectionalNodePool< typename HashTableType::ValueType, NodeAllocator > | NodeFactory |
Public Member Functions | |
HashTable_ImplParameters (const ALLOCATOR &allocator) | |
HashTable_ImplParameters (const HASHER &hash, const COMPARATOR &compare, const ALLOCATOR &allocator) | |
HashTable_ImplParameters (const HashTable_ImplParameters &original, const ALLOCATOR &allocator) | |
HashTable_ImplParameters (bslmf::MovableRef< HashTable_ImplParameters > original) | |
NodeFactory & | nodeFactory () |
void | quickSwapExchangeAllocators (HashTable_ImplParameters *other) |
void | quickSwapRetainAllocators (HashTable_ImplParameters *other) |
const BaseComparator & | comparator () const |
template<class DEDUCED_KEY > | |
std::size_t | hashCodeForKey (DEDUCED_KEY &key) const |
const BaseHasher & | hasher () const |
const NodeFactory & | nodeFactory () const |
const COMPARATOR & | originalComparator () const |
const HASHER & | originalHasher () const |
This class holds all the parameterized parts of a HashTable
class, efficiently exploiting the empty base optimization without adding unforeseen namespace associations to the HashTable
class itself due to the structural inheritance.
typedef HashTable<KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTableType |
typedef ReboundTraits::allocator_type bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeAllocator |
typedef BidirectionalNodePool<typename HashTableType::ValueType, NodeAllocator> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeFactory |
typedef HashTableType::AllocatorTraits::template rebind_traits<NodeType> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::ReboundTraits |
|
inlineexplicit |
Create a HashTable_ImplParameters
object having default constructed HASHER
and COMPARATOR
functors, and using the specified allocator
to provide a BidirectionalNodePool
.
|
inline |
Create a HashTable_ImplParameters
object having the specified hash
and compare
functors, and using the specified allocator
to provide a BidirectionalNodePool
.
|
inline |
Create a HashTable_ImplParameters
object having the same hasher
and comparator
attributes as the specified original
, and providing a BidirectionalNodePool
using the specified allocator
.
|
inline |
Create a HashTable_ImplParameters
object with a copy of the hasher
and comparator
attributes associated with the specified original
parameters object, and adopting all outstanding memory allocations and the allocator associated with original
. Note that original
is left in a valid but unspecified state.
|
inline |
Return a reference offering non-modifiable access to the comparator
functor owned by this object.
|
inline |
Return the hash code for the specified key
using a copy of the hash functor supplied at construction. Note that this function is provided as a common way to resolve const_cast
issues in the case that the stored hash functor has a function call operator that is not declared as const
.
|
inline |
Return a reference offering non-modifiable access to the hasher
functor owned by this object.
|
inline |
Return a reference offering modifiable access to the nodeFactory
owned by this object.
|
inline |
Return a reference offering non-modifiable access to the nodeFactory
owned by this object.
|
inline |
Return a reference offering non-modifiable access to the comparator
functor owned by this object.
|
inline |
Return a reference offering non-modifiable access to the hasher
functor owned by this object.
|
inline |
Efficiently exchange the value, functor, and allocator of this object with those of the specified other
object. This method provides the no-throw exception-safety guarantee.
|
inline |
Efficiently exchange the value and functors this object with those of the specified other
object. This method provides the no-throw exception-safety guarantee. The behavior is undefined unless this object was created with the same allocator as other
.