Open
Graph Drawing
Framework

 v.2012.05
 

HashIterator2D.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00045 #ifdef _MSC_VER
00046 #pragma once
00047 #endif
00048 
00049 
00050 #ifndef OGDF_HASHITERATOR2D_H
00051 #define OGDF_HASHITERATOR2D_H
00052 
00053 
00054 namespace ogdf {
00055 
00056 
00061 template< class I1_, class I2_, class E_,
00062     class Hash1_ = DefHashFunc<I1_>,
00063     class Hash2_ = DefHashFunc<I2_> >
00064 class HashConstIterator2D :
00065     private HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >
00066 {
00067 public:
00069     HashConstIterator2D() {};
00070 
00072     HashConstIterator2D(const HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &it)
00073         : HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >(it) { }
00074 
00076     HashConstIterator2D(const HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> > &it)
00077         : HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >(it) { }
00078 
00080     HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &
00081         operator=(const HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &it)
00082     {
00083         HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::operator=(it);
00084         return *this;
00085     }
00086 
00088     bool valid() const {
00089         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::valid();
00090     }
00091 
00093     const I1_ &key1() const {
00094         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::key().x1();
00095     }
00096 
00098     const I2_ &key2() const {
00099         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::key().x2();
00100     }
00101 
00103     const E_ &info() const {
00104         return HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::info();
00105     }
00106 
00108     HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> &operator++() {
00109         HashConstIterator<Tuple2<I1_,I2_>,E_,HashFuncTuple<I1_,I2_,Hash1_,Hash2_> >::operator++();
00110         return *this;
00111     }
00112 };
00113 
00114 }
00115 
00116 
00117 
00118 #endif
00119