Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bslstl::HashTable_Util Struct Reference

#include <bslstl_hashtable.h>

List of all members.

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.

See Component bslstl_hashtable


Member Function Documentation

template<class TYPE >
static void bslstl::HashTable_Util::assertNotNullPointer ( TYPE &   )  [static]
template<class TYPE >
static void bslstl::HashTable_Util::assertNotNullPointer ( TYPE *const &  ptr  )  [static]
template<class TYPE >
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.

template<class ALLOCATOR >
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.

template<class 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().


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