HashTableIterator.h
Go to the documentation of this file.00001 00024 #ifndef __HashTableIterator_H__ 00025 #define __HashTableIterator_H__ 00026 00027 // Includes 00028 00029 // Forward declares 00030 template<class HASHTABLEKEY, class TYPE> class HashTable; 00031 00032 // HashTableIterator 00033 template<class HASHTABLEKEY, class TYPE> 00034 class HashTableIterator 00035 { 00036 public: 00040 HashTableIterator(const HashTable<HASHTABLEKEY,TYPE>& table); 00041 00048 void MoveFirst(); 00049 00055 void MoveNext(); 00056 00062 void MovePrevious(); 00063 00070 void MoveLast(); 00071 00077 TYPE& GetCurrent() const; 00078 00084 bool IsValid() const; 00085 00086 00092 bool Find( 00093 const HASHTABLEKEY& key 00094 ); 00095 00101 const HASHTABLEKEY& GetCurrentKey() const; 00102 00103 private: 00104 friend class HashTable<HASHTABLEKEY, TYPE>; 00105 int currentGetIndex_; 00106 const HashTable<HASHTABLEKEY, TYPE>* table_; 00107 }; 00108 00109 // Implementation 00110 #include "HashTableIterator.inl" 00111 00112 #endif /* __HashTableIterator_H__ */ 00113
Reproduction/republishing of any material on this site without permission is strictly prohibited.
