template<class KEY, class VALUE>
class bdlcc::StripedUnorderedContainerImpl_Bucket< KEY, VALUE >
This class represents a bucket of the hash map. This class template represents the head of in the singly-linked list of (KEY, VALUE) elements in a hash map.
See bdlcc_stripedunorderedcontainerimpl
|
| | BSLMF_NESTED_TRAIT_DECLARATION (StripedUnorderedContainerImpl_Bucket, bslma::UsesBslmaAllocator) |
| |
| | StripedUnorderedContainerImpl_Bucket (bslma::Allocator *basicAllocator=0) |
| |
| | StripedUnorderedContainerImpl_Bucket (bslmf::MovableRef< StripedUnorderedContainerImpl_Bucket< KEY, VALUE > > original, bslma::Allocator *) |
| |
| | ~StripedUnorderedContainerImpl_Bucket () |
| |
| void | addNode (StripedUnorderedContainerImpl_Node< KEY, VALUE > *nodePtr) |
| |
| void | clear () |
| |
| StripedUnorderedContainerImpl_Node< KEY, VALUE > ** | headAddress () |
| |
| void | incrementSize (int amount) |
| |
| void | setHead (StripedUnorderedContainerImpl_Node< KEY, VALUE > *value) |
| |
| void | setSize (bsl::size_t value) |
| |
| void | setTail (StripedUnorderedContainerImpl_Node< KEY, VALUE > *value) |
| |
| template<class EQUAL > |
| bsl::size_t | setValue (const KEY &key, const EQUAL &equal, const VALUE &value, BucketScope scope) |
| |
| template<class EQUAL > |
| bsl::size_t | setValue (const KEY &key, const EQUAL &equal, bslmf::MovableRef< VALUE > value) |
| |
| bool | empty () const |
| |
| StripedUnorderedContainerImpl_Node< KEY, VALUE > * | head () const |
| |
| bsl::size_t | size () const |
| |
| StripedUnorderedContainerImpl_Node< KEY, VALUE > * | tail () const |
| |
| bslma::Allocator * | allocator () const |
| |
template<class KEY , class VALUE >
template<class EQUAL >
Set the value attribute of the element in this bucket having the specified key to the specified value, using the specified equal to compare keys. If no such element exists, insert (key, value). The behavior with respect to duplicate key values in the bucket depends on the specified scope:
: e_BUCKETSCOPE_ALL: : Set value to every element in the bucket having key. : : e_BUCKETSCOPE_FIRST: : Set value to the first element found having key.
Return the number of elements found having key that had their value set.
- Note
- Note that, when there are multiple elements having
key, the selection of "first" is unspecified and subject to change. Also note that specifying e_BUCKETSCOPE_FIRST is more performant when there is a single element in the bucket having key.