BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > Class Template Reference

#include <bslstl_hashtable.h>

Inheritance diagram for bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >:

Public Types

typedef HashTable< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > HashTableType
 
typedef HashTableType::AllocatorTraits::template rebind_traits< NodeTypeReboundTraits
 
typedef ReboundTraits::allocator_type NodeAllocator
 
typedef BidirectionalNodePool< typename HashTableType::ValueType, NodeAllocatorNodeFactory
 

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)
 
NodeFactorynodeFactory ()
 
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 NodeFactorynodeFactory () const
 
const COMPARATOR & originalComparator () const
 
const HASHER & originalHasher () const
 

Detailed Description

template<class KEY_CONFIG, class HASHER, class COMPARATOR, class ALLOCATOR>
class bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >

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.

Member Typedef Documentation

◆ HashTableType

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
typedef HashTable<KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTableType

◆ NodeAllocator

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
typedef ReboundTraits::allocator_type bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeAllocator

◆ NodeFactory

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
typedef BidirectionalNodePool<typename HashTableType::ValueType, NodeAllocator> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeFactory

◆ ReboundTraits

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
typedef HashTableType::AllocatorTraits::template rebind_traits<NodeType> bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::ReboundTraits

Constructor & Destructor Documentation

◆ HashTable_ImplParameters() [1/4]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTable_ImplParameters ( const ALLOCATOR &  allocator)
inlineexplicit

Create a HashTable_ImplParameters object having default constructed HASHER and COMPARATOR functors, and using the specified allocator to provide a BidirectionalNodePool.

◆ HashTable_ImplParameters() [2/4]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTable_ImplParameters ( const HASHER &  hash,
const COMPARATOR &  compare,
const ALLOCATOR &  allocator 
)
inline

Create a HashTable_ImplParameters object having the specified hash and compare functors, and using the specified allocator to provide a BidirectionalNodePool.

◆ HashTable_ImplParameters() [3/4]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTable_ImplParameters ( const HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > &  original,
const ALLOCATOR &  allocator 
)
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.

◆ HashTable_ImplParameters() [4/4]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::HashTable_ImplParameters ( bslmf::MovableRef< HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > >  original)
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.

Member Function Documentation

◆ comparator()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
const HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::BaseComparator & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::comparator ( ) const
inline

Return a reference offering non-modifiable access to the comparator functor owned by this object.

◆ hashCodeForKey()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
template<class DEDUCED_KEY >
std::size_t bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::hashCodeForKey ( DEDUCED_KEY &  key) const
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.

◆ hasher()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
const HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::BaseHasher & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::hasher ( ) const
inline

Return a reference offering non-modifiable access to the hasher functor owned by this object.

◆ nodeFactory() [1/2]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeFactory & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::nodeFactory ( )
inline

Return a reference offering modifiable access to the nodeFactory owned by this object.

◆ nodeFactory() [2/2]

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
const HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::NodeFactory & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::nodeFactory ( ) const
inline

Return a reference offering non-modifiable access to the nodeFactory owned by this object.

◆ originalComparator()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
const COMPARATOR & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::originalComparator ( ) const
inline

Return a reference offering non-modifiable access to the comparator functor owned by this object.

◆ originalHasher()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
const HASHER & bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::originalHasher ( ) const
inline

Return a reference offering non-modifiable access to the hasher functor owned by this object.

◆ quickSwapExchangeAllocators()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
void bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::quickSwapExchangeAllocators ( HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > *  other)
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.

◆ quickSwapRetainAllocators()

template<class KEY_CONFIG , class HASHER , class COMPARATOR , class ALLOCATOR >
void bslstl::HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR >::quickSwapRetainAllocators ( HashTable_ImplParameters< KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR > *  other)
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.


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