CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csHash< T, K, KeyHandler >::GlobalIterator Class Reference

An iterator class for the hash. More...

#include <hash.h>

Inheritance diagram for csHash< T, K, KeyHandler >::GlobalIterator:

csSet< T, KeyHandler >::GlobalIterator List of all members.

Public Methods

 GlobalIterator (const Iterator &o)
 Copy constructor.

GlobalIterator & operator= (const GlobalIterator &o)
 Assignment operator.

bool HasNext () const
 Returns a boolean indicating whether or not the hash has more elements.

void Advance ()
 Advance the iterator of one step.

const T & NextNoAdvance ()
 Get the next element's value, don't move the iterator.

const T & Next ()
 Get the next element's value.

const T & Next (K &key)
 Get the next element's value and key.

void Reset ()
 Move the iterator back to the first element.


Detailed Description

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
class csHash< T, K, KeyHandler >::GlobalIterator

An iterator class for the hash.

Definition at line 402 of file hash.h.


Constructor & Destructor Documentation

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
csHash< T, K, KeyHandler >::GlobalIterator::GlobalIterator const Iterator   o [inline]
 

Copy constructor.

Definition at line 438 of file hash.h.


Member Function Documentation

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
void csHash< T, K, KeyHandler >::GlobalIterator::Advance   [inline]
 

Advance the iterator of one step.

Definition at line 462 of file hash.h.

Referenced by csHash< T, K, KeyHandler >::GlobalIterator::Next().

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
bool csHash< T, K, KeyHandler >::GlobalIterator::HasNext   const [inline]
 

Returns a boolean indicating whether or not the hash has more elements.

Definition at line 455 of file hash.h.

References csHash< T, K, KeyHandler >::Elements, and csArray< csArray< Element > >::Length().

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
const T& csHash< T, K, KeyHandler >::GlobalIterator::Next K &    key [inline]
 

Get the next element's value and key.

Definition at line 489 of file hash.h.

References csHash< T, K, KeyHandler >::Elements, and csHash< T, K, KeyHandler >::GlobalIterator::Next().

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
const T& csHash< T, K, KeyHandler >::GlobalIterator::Next   [inline]
 

Get the next element's value.

Definition at line 475 of file hash.h.

References csHash< T, K, KeyHandler >::GlobalIterator::Advance(), and csHash< T, K, KeyHandler >::GlobalIterator::NextNoAdvance().

Referenced by csHash< T, K, KeyHandler >::GlobalIterator::Next().

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
const T& csHash< T, K, KeyHandler >::GlobalIterator::NextNoAdvance   [inline]
 

Get the next element's value, don't move the iterator.

Definition at line 469 of file hash.h.

References csHash< T, K, KeyHandler >::Elements.

Referenced by csHash< T, K, KeyHandler >::GlobalIterator::Next().

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
GlobalIterator& csHash< T, K, KeyHandler >::GlobalIterator::operator= const GlobalIterator &    o [inline]
 

Assignment operator.

Definition at line 445 of file hash.h.

References csHash< T, K, KeyHandler >::GlobalIterator::bucket, csHash< T, K, KeyHandler >::GlobalIterator::element, csHash< T, K, KeyHandler >::GlobalIterator::hash, and csHash< T, K, KeyHandler >::GlobalIterator::size.

template<class T, class K = unsigned int, class KeyHandler = csIntegralHashKeyHandler<K>>
void csHash< T, K, KeyHandler >::GlobalIterator::Reset   [inline]
 

Move the iterator back to the first element.

Definition at line 496 of file hash.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18