2 dictionary-iter.hh -- declare Dictionary_iter
4 source file of the Flower Library
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef DICTIONARY_ITER_HH
11 #define DICTIONARY_ITER_HH
13 #include "dictionary.hh"
15 template<class K, class V>
18 Hash_table<K,V> *dict_l_;
21 Hash_table_iter(Hash_table<K,V> const &dict)
24 dict_l_ =(Hash_table<K,V> *) & dict;
30 return i < dict_l_->fixed_p_->dict_arr_.size ();
35 while (ok () && dict_l_->fixed_p_->dict_arr_[i].free_b_)
48 return dict_l_->fixed_p_->dict_arr_[i].key_;
52 return dict_l_->fixed_p_->dict_arr_[i].value_;
56 return dict_l_->fixed_p_->dict_arr_[i].value_;
61 class Dictionary_iter<V> : public Hash_table_iter<String,V>
64 Dictionary_iter (Dictionary<V> const &d)
65 : Hash_table_iter<String,V> (d)
72 #endif // Hash_table_ITER_HH