BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::HashTable_Util Struct Reference

#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)
 

Detailed Description

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.

Member Function Documentation

◆ 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: