visit overloads

Synopses

Declared in <bdlcc_stripedunorderedmap.h>

Call the specified visitor (in an unspecified order) on all elements in this hash table until each such element has been visited or visitor returns false. That is, for (key, value), invoke: ` bool visitor(&value, key); ` Return the number of elements visited or the negation of that value if visitations stopped because visitor returned false. visitor has exclusive access (i.e., write access) to each element for duration of each invocation. Every element present in this hash map at the time visit is invoked will be visited unless it is removed before visitor is called for that element. Each visitation is done by the calling thread and the order of visitation is not specified. Elements inserted during the execution of visit may or may not be visited. The behavior is undefined if hash map manipulators and getValue* methods are invoked from within visitor, as it may lead to a deadlock. Note that visitor can change the value of the visited elements.

int
visit(VisitorFunction const& visitor);

Call the specified visitor with the element (if one exists) in this hash map having the specified key. That is: ` bool visitor(&value, key); ` Return the number of elements updated or ‐1 if visitor returned false. visitor has exclusive access (i.e., write access) the element for during its invocation. The behavior is undefined if hash map manipulators and getValue* methods are invoked from within visitor, as it may lead to a deadlock.

int
visit(
    KEY const& key,
    VisitorFunction const& visitor);

Created with MrDocs