Open
Graph Drawing
Framework

 v.2010.10
 

HashIterator2D.h

Go to the documentation of this file.
00001 /*
00002  * $Revision: 2027 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2010-09-01 11:55:17 +0200 (Wed, 01 Sep 2010) $ 
00007  ***************************************************************/
00008  
00055 #ifdef _MSC_VER
00056 #pragma once
00057 #endif
00058 
00059 
00060 #ifndef OGDF_HASHITERATOR2D_H
00061 #define OGDF_HASHITERATOR2D_H
00062 
00063 
00064 namespace ogdf {
00065 
00066 
00071 template< class I1_, class I2_, class E_,
00072     class Hash1_ = DefHashFunc<I1_>,
00073     class Hash2_ = DefHashFunc<I2_> >
00074 class HashConstIterator2D :
00075     private HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >
00076 {
00077 public:
00079     HashConstIterator2D() {};
00080 
00082     HashConstIterator2D(const HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &it)
00083         : HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >(it) { }
00084 
00086     HashConstIterator2D(const HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> > &it)
00087         : HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >(it) { }
00088 
00090     HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &
00091         operator=(const HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &it)
00092     {
00093         HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::operator=(it);
00094         return *this;
00095     }
00096 
00098     bool valid() const {
00099         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::valid();
00100     }
00101 
00103     const I1_ &key1() const {
00104         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::key().x1();
00105     }
00106 
00108     const I2_ &key2() const {
00109         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::key().x2();
00110     }
00111 
00113     const E_ &info() const {
00114         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::info();
00115     }
00116 
00118     HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &operator++() {
00119         HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::operator++();
00120         return *this;
00121     }
00122 };
00123 
00124 }
00125 
00126 
00127 
00128 #endif
00129