JASSv2
Public Member Functions | Private Attributes | List of all members
JASS::hash_table< KEY, ELEMENT, BITS >::iterator Class Reference

Iterate over the hash table. More...

#include <hash_table.h>

Collaboration diagram for JASS::hash_table< KEY, ELEMENT, BITS >::iterator:
Collaboration graph
[legend]

Public Member Functions

 iterator (const hash_table &over, size_t current)
 Constructor. More...
 
const std::pair< const KEY &, const ELEMENT & > operator* () const
 Return a reference to the object at the current location. More...
 
bool operator!= (const iterator &other) const
 Compare two iterator objects for non-equality. More...
 
iteratoroperator++ ()
 Increment this iterator.
 

Private Attributes

const hash_table< KEY, ELEMENT, BITS > & iterand
 The hash table being iterated over.
 
size_t location
 Current node in the hash table.
 
binary_tree< KEY, ELEMENT >::iterator tree_iterator
 Iterator over the binary tree at the current hash table node.
 
binary_tree< KEY, ELEMENT >::iterator tree_iterator_end
 When to end iterating over the binary tree at the current hash table node.
 

Detailed Description

template<typename KEY, typename ELEMENT, size_t BITS = 24>
class JASS::hash_table< KEY, ELEMENT, BITS >::iterator

Iterate over the hash table.

Constructor & Destructor Documentation

◆ iterator()

template<typename KEY, typename ELEMENT, size_t BITS = 24>
JASS::hash_table< KEY, ELEMENT, BITS >::iterator::iterator ( const hash_table over,
size_t  current 
)
inline

Constructor.

Parameters
over[in] The hash table to iterate over.
current[in] The node to start at.

Member Function Documentation

◆ operator!=()

template<typename KEY, typename ELEMENT, size_t BITS = 24>
bool JASS::hash_table< KEY, ELEMENT, BITS >::iterator::operator!= ( const iterator other) const
inline

Compare two iterator objects for non-equality.

Parameters
other[in] The iterator object to compare to.
Returns
true if they differ, else false.

◆ operator*()

template<typename KEY, typename ELEMENT, size_t BITS = 24>
const std::pair<const KEY &, const ELEMENT &> JASS::hash_table< KEY, ELEMENT, BITS >::iterator::operator* ( ) const
inline

Return a reference to the object at the current location.

Returns
The current object.

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