This class implements the logic for a striped hash multimap with logic that supports a (unique) map as a special case.

Synopsis

Declared in <bdlcc_stripedunorderedcontainerimpl.h>

template<
    class KEY,
    class VALUE,
    class HASH = bsl::hash<KEY>,
    class EQUAL = bsl::equal_to<KEY>>
class StripedUnorderedContainerImpl;

Type Aliases

Name

Description

EraseIfValuePredicate

Alias for a predicate that selects values to erase.

KVType

Value type of a bulk insert entry.

Node

Node in a bucket.

ReadOnlyVisitorFunction

Alias for a read‐only visitor over element values.

VisitorFunction

Alias for a visitor that may modify element values.

Enums

Name

Description

Unnamed enum

Default sizing constants for this container.

Member Functions

Name

Description

StripedUnorderedContainerImpl [constructor]

Constructors

~StripedUnorderedContainerImpl [destructor]

Destroy this hash map. This method is not thread‐safe.

allocator

Return the allocator used by this hash map to supply memory.

bucketCount

Return the number of buckets in this hash map.

bucketIndex

Return the bucket index where elements with key are inserted.

bucketSize

Return the number of elements in the bucket at index.

canRehash

Return true if rehash is enabled and rehash is not in progress, and false otherwise.

clear

Remove all elements from this striped hash map. If rehash is in progress, block until it completes.

disableRehash

Prevent rehash until the enableRehash method is called.

empty

Return true if this hash map contains no elements, and false otherwise.

enableRehash

Allow rehashing to resume when the load factor is exceeded.

equalFunction

Return (a copy of) the key‐equality functor used by this hash map that returns true if two KEY objects have the same value, and false otherwise.

eraseAll

Erase all elements matching the specified key.

eraseAllIf

Erase elements matching key for which predicate is true.

eraseBulkAll

Erase all elements whose keys fall in [first, last)].

eraseBulkFirst

Erase the first element for each key in [first, last)].

eraseFirst

Erase the first element found with the specified key.

eraseFirstIf

Erase the first element with key for which predicate is true.

getValue

getValue overloads

hashFunction

Return (a copy of) the unary hash functor used by this hash map to generate a hash value (of type std::size_t) for a KEY object.

insertAlways

insertAlways overloads

insertBulkAlways

Insert key‐value pairs from the range [first, last)].

insertBulkUnique

Insert or update unique keys from the range [first, last)].

insertUnique

insertUnique overloads

isRehashEnabled

Return true if rehash is enabled, or false otherwise.

loadFactor

Return the current size divided by the number of buckets.

maxLoadFactor

Return the maximum load factor allowed for this hash map.

numStripes

Return the number of stripes in the hash.

rehash

Recreate this hash map with at least numBuckets buckets.

setComputedValueAll

Invoke visitor on every element having key, inserting if absent.

setComputedValueFirst

Invoke visitor on the first element having key, inserting if absent.

setValueAll

Set every element with key to value, inserting if none exist.

setValueFirst

setValueFirst overloads

size

Return the current number of elements in this hash.

update

Update each element with key by invoking the specified visitor.

visit

visit overloads

visitReadOnly

visitReadOnly overloads

Friends

Name

Description

BloombergLP::bdlcc::StripedUnorderedContainerImpl_LockElement

A mutex + support info; padded to cacheline size, one per stripe

BloombergLP::bdlcc::StripedUnorderedContainerImpl_TestUtil

Test utility exposing stripe lock/unlock for the test driver.

Created with MrDocs