ACE 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > Class Template Reference

Forward iterator for the ACE_Hash_Multi_Map_Manager which only traverses a particular bucket. The particular bucket is specified by the EXT_ID parameter specified in the constructor. More...

#include <Hash_Multi_Map_Manager_T.h>

Public Member Functions

 ACE_Hash_Multi_Map_Bucket_Iterator (ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &mm, const EXT_ID &ext_id, int tail=0)
 
ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & operator++ ()
 Prefix advance.
 
ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > operator++ (int)
 Postfix advance.
 
ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & operator-- ()
 Prefix reverse.
 
ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > operator-- (int)
 Postfix reverse.
 
ACE_Hash_Multi_Map_Entry< EXT_ID, INT_ID > & operator* () const
 Returns a reference to the interal element this object is pointing to.
 
ACE_Hash_Multi_Map_Entry< EXT_ID, INT_ID > * operator-> () const
 Returns a pointer to the interal element this object is pointing to.
 
ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & map ()
 
bool operator== (const ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &) const
 Check if two iterators point to the same position.
 
bool operator!= (const ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &) const
 

Protected Member Functions

int forward_i ()
 
int reverse_i ()
 

Protected Attributes

ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > * map_man_
 Map we are iterating over.
 
ssize_t index_
 Keeps track of how far we've advanced in the table.
 
ACE_Hash_Multi_Map_Entry< EXT_ID, INT_ID > * next_
 

Detailed Description

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
class ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >

Forward iterator for the ACE_Hash_Multi_Map_Manager which only traverses a particular bucket. The particular bucket is specified by the EXT_ID parameter specified in the constructor.

This class does not perform any internal locking of the ACE_Hash_Multi_Map_Manager it is iterating upon since locking is inherently inefficient and/or error-prone within an STL-style iterator. If you require locking, you can explicitly use an ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Multi_Map_Manager's internal lock, which is accessible via its mutex method.

Note that a creation method for this new iterator cannot be added to the hash map, since this would require adding explicit template instantiations for bucket iterators on platforms with broken templates.

Constructor & Destructor Documentation

◆ ACE_Hash_Multi_Map_Bucket_Iterator()

Member Function Documentation

◆ forward_i()

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i ( )
protected

Move forward by one element in the set. Returns 0 when there's no more item in the set after the current items, else 1.

◆ map()

Returns reference the Hash_Multi_Map_Manager that is being iterated over.

◆ operator!=()

◆ operator*()

Returns a reference to the interal element this object is pointing to.

◆ operator++() [1/2]

Prefix advance.

◆ operator++() [2/2]

Postfix advance.

◆ operator--() [1/2]

Prefix reverse.

◆ operator--() [2/2]

Postfix reverse.

◆ operator->()

Returns a pointer to the interal element this object is pointing to.

◆ operator==()

Check if two iterators point to the same position.

◆ reverse_i()

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Multi_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i ( )
protected

Move backward by one element in the set. Returns 0 when there's no more item in the set before the current item, else 1.

Member Data Documentation

◆ index_

Keeps track of how far we've advanced in the table.

◆ map_man_

Map we are iterating over.

◆ next_

Keeps track of how far we've advanced in a linked list in each table slot.


The documentation for this class was generated from the following files: