#include <bslstl_hashtable.h>
This utility struct
provide utilities for initializing and destroying bucket lists in anchors that are managed by a HashTable
. They cannot migrate down to bslalg::HashTableImpUtil
as they rely on the standard library bslma_allocatortraits for their implementation.
◆ assertNotNullPointer() [1/3]
template<class TYPE >
void bslstl::HashTable_Util::assertNotNullPointer |
( |
TYPE & |
| ) |
|
|
inlinestatic |
Assert that the passed argument (the specified ptr
) is not a null pointer value. Note that this utility is necessary as the HashTable
class template may be instantiated with function pointers for the hasher or comparator policies, but there is no easy way to assert in general that the value of a generic type passed to a function is not a null pointer value.
◆ assertNotNullPointer() [2/3]
template<class TYPE >
void bslstl::HashTable_Util::assertNotNullPointer |
( |
TYPE *& |
ptr | ) |
|
|
inlinestatic |
◆ assertNotNullPointer() [3/3]
template<class TYPE >
void bslstl::HashTable_Util::assertNotNullPointer |
( |
TYPE *const & |
ptr | ) |
|
|
inlinestatic |
◆ destroyBucketArray()
template<class ALLOCATOR >
void bslstl::HashTable_Util::destroyBucketArray |
( |
bslalg::HashTableBucket * |
data, |
|
|
std::size_t |
bucketArraySize, |
|
|
const ALLOCATOR & |
allocator |
|
) |
| |
|
inlinestatic |
Destroy the specified data
array of the specified length bucketArraySize
, that was allocated by the specified allocator
.
◆ initAnchor()
template<class ALLOCATOR >
void bslstl::HashTable_Util::initAnchor |
( |
bslalg::HashTableAnchor * |
anchor, |
|
|
std::size_t |
bucketArraySize, |
|
|
const ALLOCATOR & |
allocator |
|
) |
| |
|
inlinestatic |
Load into the specified anchor
a (contiguous) array of buckets of the specified bucketArraySize
using memory supplied by the specified allocator
. The behavior is undefined unless 0 < bucketArraySize
and 0 == anchor->bucketArraySize()
. Note that this operation has no effect on anchor->listRootAddress()
.
The documentation for this struct was generated from the following file: