Go to Overview over all GrAL packages.
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Gral/Base/cell-iterator-int.h

00001 #ifndef GRAL_GB_CELL_ITERATOR_INT_H
00002 #define GRAL_GB_CELL_ITERATOR_INT_H
00003 
00004 // $LICENSE
00005 
00012 template<class GRID>
00013 class int_cell_iterator {
00014   typedef int_cell_iterator<GRID> self;
00015 public:
00016   typedef GRID grid_type;
00017 protected:
00018   grid_type const* g;
00019   int c;
00020 public:
00021   int_cell_iterator() : g(0), c(-1) {}
00022   explicit
00023   int_cell_iterator(grid_type const& gg, int cc = 0) : g(&gg), c(cc) {}
00024 
00025   self      & operator++() { ++c; return *this;}
00026   self const& operator*() const { return *this;}
00027   grid_type const& TheGrid() const { return *g;}
00028   bool IsDone() const { return (c >= g->NumOfCells());}
00029   int  handle()  const { return c;}
00030 
00031   bool operator==(self const& rhs) const { return (rhs.c == c) && (rhs.g == g);}
00032   bool operator!=(self const& rhs) const { return !((*this) == rhs);}
00033 };
00034 
00035 #endif
00036 

Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 16:05:41 2002 for GrAL Base by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000