CrystalSpace

Public API Reference

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

csGlobalHashIterator Class Reference

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

#include <csutil/hashmap.h>

Inheritance diagram for csGlobalHashIterator:

csGlobalHashIteratorReversible List of all members.

Public Member Functions

 csGlobalHashIterator (csHashMap *hash)
 Constructor for an iterator to iterate over all elements in a hashmap.
 csGlobalHashIterator (const csHashMap *hash)
 Construct from a const hashmap.
bool HasNext () const
 Is there a next element in this iterator?
csHashObject Next ()
 Get the next element.
csHashObject NextConst ()
 deprecated. (matze: this function is totally pointless)
void DeleteNext ()
 Delete next element and fetches new one.

Friends

class csHashMap
class csGlobalHashIteratorReversible

Detailed Description

An iterator to iterate over all 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 81 of file hashmap.h.


Constructor & Destructor Documentation

csGlobalHashIterator::csGlobalHashIterator csHashMap hash  ) 
 

Constructor for an iterator to iterate over all elements in a hashmap.

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

csGlobalHashIterator::csGlobalHashIterator const csHashMap hash  ) 
 

Construct from a const hashmap.

Can do everything except DeleteNext().


Member Function Documentation

void csGlobalHashIterator::DeleteNext  ) 
 

Delete next element and fetches new one.

@@ Not implemented yet!

bool csGlobalHashIterator::HasNext  )  const
 

Is there a next element in this iterator?

csHashObject csGlobalHashIterator::Next  ) 
 

Get the next element.

Reimplemented in csGlobalHashIteratorReversible.

csHashObject csGlobalHashIterator::NextConst  ) 
 

deprecated. (matze: this function is totally pointless)


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