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 |
An alias to a function meeting the following contract: ` bool eraseIfValuePredicate(const VALUE& value); // Return 'true' if the specified 'value' is to be removed from // the container, and 'false' otherwise. Note that this // functor can not change the values associated with 'value'. ` |
|
Value type of a bulk insert entry. |
|
Node in a bucket. |
|
An alias to a function meeting the following contract: ` bool visitorFunction(const VALUE& value, const KEY& key); // Visit the specified 'value' attribute associated with the // specified 'key'. Return 'true' if this function may be // called on additional elements, and 'false' otherwise (i.e., // if no other elements should be visited). Note that this // functor can not change the values associated with 'key' // and 'value'. ` |
|
An alias to a function meeting the following contract: ` bool visitorFunction(VALUE *value, const KEY& key); // Visit the specified 'value' attribute associated with the // specified 'key'. Return 'true' if this function may be // called on additional elements, and 'false' otherwise (i.e., // if no other elements should be visited). Note that this // functor can change the value associated with 'key'. ` |
Enums
Name |
Description |
Default sizing constants for this container. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this hash map. This method is not thread‐safe. |
Return the allocator used by this hash map to supply memory. Note that if no allocator was supplied at construction the default allocator installed at that time is used. |
|
Return the number of buckets in the array of buckets maintained by this hash map. Note that unless rehash is disabled, the value returned may be obsolete by the time it is received. |
|
Return the index of the bucket, in the array of buckets maintained by this hash map, where elements having the specified |
|
Return the number of elements contained in the bucket at the specified |
|
Return |
|
Remove all elements from this striped hash map. If rehash is in progress, block until it completes. |
|
Prevent rehash until the |
|
Return |
|
Allow rehash. If conditions warrant, rehash will be started by the next method call that observes the load factor is exceeded (see {Concurrent Rehash}). Note that calling |
|
Return (a copy of) the key‐equality functor used by this hash map that returns |
|
Erase from this hash map the elements having the specified |
|
Erase from this hash map the elements having the specified |
|
Erase from this hash map elements in this hash map having any of the values in the keys contained between the specified |
|
Erase from this hash map elements in this hash map having any of the values in the keys contained between the specified |
|
Erase from this hash map the first element (of possibly many) found to the specified |
|
Erase from this hash map the first element with specified |
|
|
|
Return (a copy of) the unary hash functor used by this hash map to generate a hash value (of type |
|
|
|
Insert into this hash map elements having the key‐value pairs obtained between the specified |
|
Insert into this hash map elements having the key‐value pairs obtained between the specified |
|
|
|
Return |
|
Return the current quotient of the size of this hash map and the number of buckets. Note that the load factor is a measure of container "fullness"; that is, a high load factor typically implies many collisions (many elements landing in the same bucket) and that decreases performance. |
|
Return the maximum load factor allowed for this hash map. If an insert operation would cause the load factor to exceed the |
|
Return the number of stripes in the hash. |
|
Recreate this hash map to one having at least the specified |
|
Serially invoke the specified |
|
Invoke the specified |
|
Set the value attribute of every element in this hash map having the specified |
|
|
|
Return the current number of elements in this hash. |
|
Serially call the specified |
|
|
|
|
Friends
Name |
Description |
|
A mutex + support info; padded to cacheline size, one per stripe |
|
This class implements a test utility that gives the test driver access to the lock / unlock method of the Read/Write mutex. Its purpose is to allow testing that the locking actually happens as planned. |
Created with MrDocs