CrystalSpace

Public API Reference

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

csHashIterator Class Reference

An iterator to iterate over elements in the hashmap. More...

#include <hashmap.h>

Inheritance diagram for csHashIterator:

csHashIteratorReversible List of all members.

Public Methods

 csHashIterator (csHashMap *hash, csHashKey Key)
 Constructor for an iterator to iterate over all elements with the given key.

 csHashIterator (const csHashMap *hash, csHashKey Key)
 Construct from a const hashmap.

bool HasNext () const
 Is there a next element in this iterator?

csHashObject Next ()
 Get the next element.

const csHashObject NextConst ()
 Const version of Next().

void DeleteNext ()
 Delete next element and fetches new one.


Detailed Description

An iterator to iterate over elements in the hashmap.

When you have an open iterator you should not alter the hashmap that this object iterates over. The only safe operation that you can do is to call 'Delete' on this iterator to delete one element from the map. The iterator will correctly point to the next element then.

Definition at line 132 of file hashmap.h.


Constructor & Destructor Documentation

csHashIterator::csHashIterator csHashMap   hash,
csHashKey    Key
 

Constructor for an iterator to iterate over all elements with the given key.

Note that you should not do changes on the hashmap when you have open iterators.

csHashIterator::csHashIterator const csHashMap   hash,
csHashKey    Key
 

Construct from a const hashmap.

Can do everything except DeleteNext().


Member Function Documentation

void csHashIterator::DeleteNext  
 

Delete next element and fetches new one.

@@ Not implemented yet!

bool csHashIterator::HasNext  
 

Is there a next element in this iterator?

csHashObject csHashIterator::Next  
 

Get the next element.

Reimplemented in csHashIteratorReversible.

const csHashObject csHashIterator::NextConst  
 

Const version of Next().


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