Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

__hashtable_iterator Struct Template Reference

#include <stl_hashtable.h>

Collaboration diagram for __hashtable_iterator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef hashtable< Value,
Key, HashFcn, ExtractKey,
EqualKey, Alloc > 
hashtable
typedef __hashtable_iterator<
Value, Key, HashFcn, ExtractKey,
EqualKey, Alloc > 
iterator
typedef __hashtable_const_iterator<
Value, Key, HashFcn, ExtractKey,
EqualKey, Alloc > 
const_iterator
typedef __hashtable_node<
Value > 
node
typedef forward_iterator_tag iterator_category
typedef Value value_type
typedef ptrdiff_t difference_type
typedef size_t size_type
typedef Value & reference
typedef Value * pointer

Public Methods

 __hashtable_iterator (node *n, hashtable *tab)
 __hashtable_iterator ()
reference operator * () const
pointer operator-> () const
iteratoroperator++ ()
iterator operator++ (int)
bool operator== (const iterator &it) const
bool operator!= (const iterator &it) const

Public Attributes

nodecur
hashtableht

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
struct __hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >


Member Typedef Documentation

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef __hashtable_const_iterator<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc> __hashtable_iterator::const_iterator
 

Definition at line 78 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef ptrdiff_t __hashtable_iterator::difference_type
 

Definition at line 83 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef hashtable<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc> __hashtable_iterator::hashtable
 

Definition at line 72 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef __hashtable_iterator<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc> __hashtable_iterator::iterator
 

Definition at line 75 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef forward_iterator_tag __hashtable_iterator::iterator_category
 

Definition at line 81 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef __hashtable_node<Value> __hashtable_iterator::node
 

Definition at line 79 of file stl_hashtable.h.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef Value* __hashtable_iterator::pointer
 

Definition at line 86 of file stl_hashtable.h.

Referenced by operator->.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef Value& __hashtable_iterator::reference
 

Definition at line 85 of file stl_hashtable.h.

Referenced by operator *.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef size_t __hashtable_iterator::size_type
 

Definition at line 84 of file stl_hashtable.h.

Referenced by operator++.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
typedef Value __hashtable_iterator::value_type
 

Definition at line 82 of file stl_hashtable.h.


Constructor & Destructor Documentation

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
__hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::__hashtable_iterator node   n,
hashtable   tab
[inline]
 

Definition at line 91 of file stl_hashtable.h.

00091 : cur(n), ht(tab) {}

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
__hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::__hashtable_iterator   [inline]
 

Definition at line 92 of file stl_hashtable.h.

00092 {}


Member Function Documentation

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
reference __hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::operator *   const [inline]
 

Definition at line 93 of file stl_hashtable.h.

References reference, and __hashtable_node::val.

Referenced by operator->.

00093 { return cur->val; }

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
bool __hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::operator!= const iterator   it const [inline]
 

Definition at line 100 of file stl_hashtable.h.

References cur.

00100 { return cur != it.cur; }

template<class V, class K, class HF, class ExK, class EqK, class A>
__hashtable_iterator< V, K, HF, ExK, EqK, A > __hashtable_iterator< V, K, HF, ExK, EqK, A >::operator++ int    [inline]
 

Definition at line 517 of file stl_hashtable.h.

00518 {
00519   iterator tmp = *this;
00520   ++*this;
00521   return tmp;
00522 }

template<class V, class K, class HF, class ExK, class EqK, class A>
__hashtable_iterator< V, K, HF, ExK, EqK, A > & __hashtable_iterator< V, K, HF, ExK, EqK, A >::operator++  
 

Definition at line 503 of file stl_hashtable.h.

References hashtable::bkt_num, hashtable::buckets, cur, ht, __hashtable_node::next, vector< node *, Alloc >::size, size_type, and __hashtable_node::val.

00504 {
00505   const node* old = cur;
00506   cur = cur->next;
00507   if (!cur) {
00508     size_type bucket = ht->bkt_num(old->val);
00509     while (!cur && ++bucket < ht->buckets.size())
00510       cur = ht->buckets[bucket];
00511   }
00512   return *this;
00513 }

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
pointer __hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::operator->   const [inline]
 

Definition at line 95 of file stl_hashtable.h.

References operator *, and pointer.

00095 { return &(operator*()); }

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
bool __hashtable_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::operator== const iterator   it const [inline]
 

Definition at line 99 of file stl_hashtable.h.

References cur.

00099 { return cur == it.cur; }


Member Data Documentation

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
node* __hashtable_iterator::cur
 

Definition at line 88 of file stl_hashtable.h.

Referenced by hashtable::erase, operator!=, operator++, and operator==.

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
hashtable* __hashtable_iterator::ht
 

Definition at line 89 of file stl_hashtable.h.

Referenced by operator++.


The documentation for this struct was generated from the following file:
logo OpenMask

Documentation generated on Thu May 2 15:03:15 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001