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

XFcHashtableIterator< Key, Value > Class Template Reference

Hashtable iterator template. More...

Collaboration diagram for XFcHashtableIterator< Key, Value >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

XFcHashtableIterator< Key,
Value > & 
operator++ ()
 Advances to the next node, pre-operation.

XFcHashtableIterator< Key,
Value > 
operator++ (int)
 Advances to the next node, post-operation.

INT operator!= (const XFcHashtableIterator< Key, Value > &aRef) const
 Inequality check.

INT operator== (const XFcHashtableIterator< Key, Value > &aRef) const
 Equality check.

INT isValid () const
 Returns information about the validity of the node.

Key getKey () const
 Returns the key from this key-value pair.

Value getValue () const
 Returns the value from this key-value pair.

Value setValue (const Value aValue)
 Sets the value of this key-value pair.

XFcHashtableIterator & operator= (const XFcHashtableIterator &aClone)
 Makes this iterator a copy of another iterator.

 XFcHashtableIterator ()
 Creates an empty iterator.


Private Member Functions

 XFcHashtableIterator (XFcHashtable< Key, Value > *aHashtable, typename XFcLinkedList< XFcHashtableNode< Key, Value > * >::forwardIterator aIterator)
 Creates an iterator pointing to a certain node.


Private Attributes

INT32 mBucketIndex
 Index of the current bucket.

XFcLinkedList< XFcHashtableNode<
Key, Value > * >::forwardIterator 
mIterator
 Forward iterator for the current bucket.

XFcHashtable< Key, Value > * mHashtable
 Current hashtable.


Friends

class XFcHashtable< Key, Value >

Detailed Description

template<class Key, class Value>
class XFcHashtableIterator< Key, Value >

Hashtable iterator template.


Constructor & Destructor Documentation

template<class Key, class Value>
XFcHashtableIterator< Key, Value >::XFcHashtableIterator  
 

Creates an empty iterator.

template<class Key, class Value>
XFcHashtableIterator< Key, Value >::XFcHashtableIterator XFcHashtable< Key, Value > *    aHashtable,
typename XFcLinkedList< XFcHashtableNode< Key, Value > * >::forwardIterator    aIterator
[private]
 

Creates an iterator pointing to a certain node.


Member Function Documentation

template<class Key, class Value>
Key XFcHashtableIterator< Key, Value >::getKey   const
 

Returns the key from this key-value pair.

template<class Key, class Value>
Value XFcHashtableIterator< Key, Value >::getValue   const
 

Returns the value from this key-value pair.

template<class Key, class Value>
INT XFcHashtableIterator< Key, Value >::isValid   const
 

Returns information about the validity of the node.

Returns:
1 if the node is valid, 0 otherwise.

template<class Key, class Value>
INT XFcHashtableIterator< Key, Value >::operator!= const XFcHashtableIterator< Key, Value > &    aRef const
 

Inequality check.

Tests if two nodes are inequal.

Parameters:
aRef iterator to test this iterator against.
Returns:
1 if inequal, 0 otherwise.

template<class Key, class Value>
XFcHashtableIterator< Key, Value > XFcHashtableIterator< Key, Value >::operator++ int   
 

Advances to the next node, post-operation.

Returns:
next node.

template<class Key, class Value>
XFcHashtableIterator< Key, Value > & XFcHashtableIterator< Key, Value >::operator++  
 

Advances to the next node, pre-operation.

Returns:
reference to next node.

template<class Key, class Value>
XFcHashtableIterator< Key, Value > & XFcHashtableIterator< Key, Value >::operator= const XFcHashtableIterator< Key, Value > &    aClone
 

Makes this iterator a copy of another iterator.

Parameters:
aClone iterator to copy state from.
Returns:
reference to this iterator.

template<class Key, class Value>
INT XFcHashtableIterator< Key, Value >::operator== const XFcHashtableIterator< Key, Value > &    aRef const
 

Equality check.

Tests if two nodes are equal.

Parameters:
aRef iterator to test this iterator against.
Returns:
1 if equal, 0 otherwise.

template<class Key, class Value>
Value XFcHashtableIterator< Key, Value >::setValue const Value    aValue
 

Sets the value of this key-value pair.

Parameters:
aValue new value to set.


Friends And Related Function Documentation

template<class Key, class Value>
friend class XFcHashtable< Key, Value > [friend]
 


Member Data Documentation

template<class Key, class Value>
INT32 XFcHashtableIterator< Key, Value >::mBucketIndex [private]
 

Index of the current bucket.

template<class Key, class Value>
XFcHashtable<Key, Value>* XFcHashtableIterator< Key, Value >::mHashtable [private]
 

Current hashtable.

template<class Key, class Value>
XFcLinkedList<XFcHashtableNode<Key, Value> *>::forwardIterator XFcHashtableIterator< Key, Value >::mIterator [private]
 

Forward iterator for the current bucket.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch