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

__hashtable_const_iterator Struct Template Reference

#include <stl_hashtable.h>

Collaboration diagram for __hashtable_const_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 const Value & reference
typedef const Value * pointer

Public Methods

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

Public Attributes

const nodecur
const hashtableht

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
struct __hashtable_const_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_const_iterator::const_iterator
 

Definition at line 114 of file stl_hashtable.h.

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

Definition at line 119 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_const_iterator::hashtable
 

Definition at line 108 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_const_iterator::iterator
 

Definition at line 111 of file stl_hashtable.h.

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

Definition at line 117 of file stl_hashtable.h.

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

Definition at line 115 of file stl_hashtable.h.

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

Definition at line 122 of file stl_hashtable.h.

Referenced by operator->.

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

Definition at line 121 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_const_iterator::size_type
 

Definition at line 120 of file stl_hashtable.h.

Referenced by operator++.

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

Definition at line 118 of file stl_hashtable.h.


Constructor & Destructor Documentation

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

Definition at line 127 of file stl_hashtable.h.

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

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

Definition at line 129 of file stl_hashtable.h.

00129 {}

template<class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc>
__hashtable_const_iterator< Value, Key, HashFcn, ExtractKey, EqualKey, Alloc >::__hashtable_const_iterator const iterator   it [inline]
 

Definition at line 130 of file stl_hashtable.h.

00130 : cur(it.cur), ht(it.ht) {}


Member Function Documentation

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

Definition at line 131 of file stl_hashtable.h.

References reference, and __hashtable_node::val.

Referenced by operator->.

00131 { return cur->val; }

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

Definition at line 138 of file stl_hashtable.h.

References cur.

00138 { return cur != it.cur; }

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

Definition at line 540 of file stl_hashtable.h.

00541 {
00542   const_iterator tmp = *this;
00543   ++*this;
00544   return tmp;
00545 }

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

Definition at line 526 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.

00527 {
00528   const node* old = cur;
00529   cur = cur->next;
00530   if (!cur) {
00531     size_type bucket = ht->bkt_num(old->val);
00532     while (!cur && ++bucket < ht->buckets.size())
00533       cur = ht->buckets[bucket];
00534   }
00535   return *this;
00536 }

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

Definition at line 133 of file stl_hashtable.h.

References operator *, and pointer.

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

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

Definition at line 137 of file stl_hashtable.h.

References cur.

00137 { return cur == it.cur; }


Member Data Documentation

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

Definition at line 124 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>
const hashtable* __hashtable_const_iterator::ht
 

Definition at line 125 of file stl_hashtable.h.

Referenced by hashtable::erase, and 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