Quick Links: |
#include <bslstl_hashtable.h>
Static Public Member Functions | |
template<class TYPE > | |
static void | assertNotNullPointer (TYPE &) |
template<class TYPE > | |
static void | assertNotNullPointer (TYPE *const &ptr) |
template<class TYPE > | |
static void | assertNotNullPointer (TYPE *&ptr) |
template<class ALLOCATOR > | |
static void | destroyBucketArray (bslalg::HashTableBucket *data, std::size_t bucketArraySize, const ALLOCATOR &allocator) |
template<class ALLOCATOR > | |
static void | initAnchor (bslalg::HashTableAnchor *anchor, std::size_t bucketArraySize, const ALLOCATOR &allocator) |
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.
See Component bslstl_hashtable
static void bslstl::HashTable_Util::assertNotNullPointer | ( | TYPE & | ) | [static] |
static void bslstl::HashTable_Util::assertNotNullPointer | ( | TYPE *const & | ptr | ) | [static] |
static void bslstl::HashTable_Util::assertNotNullPointer | ( | TYPE *& | ptr | ) | [static] |
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.
static void bslstl::HashTable_Util::destroyBucketArray | ( | bslalg::HashTableBucket * | data, | |
std::size_t | bucketArraySize, | |||
const ALLOCATOR & | allocator | |||
) | [static] |
Destroy the specified data
array of the specified length bucketArraySize
, that was allocated by the specified allocator
.
static void bslstl::HashTable_Util::initAnchor | ( | bslalg::HashTableAnchor * | anchor, | |
std::size_t | bucketArraySize, | |||
const ALLOCATOR & | allocator | |||
) | [static] |
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()
.