#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Core/Container/SArray/SArr2Iter2.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVL_SARR2ITER2_HEADER #define RAVL_SARR2ITER2_HEADER 1 //////////////////////////////////////////////////////////// //! docentry="Ravl.Core.Arrays.2D" //! rcsid="$Id: SArr2Iter2.hh,v 1.3 2002/06/18 10:37:22 craftit Exp $ //! file="Ravl/Core/Container/SArray/SArr2Iter2.hh" //! lib=RavlCore //! author="Charles Galambos" //! date="10/09/1998" //! userlevel=Advanced #include "Ravl/SArray2d.hh" #include "Ravl/BfAcc2Iter2.hh" namespace RavlN { //! userlevel=Advanced //: Duel SArray2dC iterator. // Duel Simple 2d array iterator. template class SArray2dIter2C : public BufferAccess2dIter2C { public: SArray2dIter2C() {} //: Default constructor. SArray2dIter2C(const SArray2dC &arr,const SArray2dC &narr2) : arr1(arr), arr2(narr2) { First(); } //: Constructor. inline bool First() { return BufferAccess2dIter2C::First(arr1,arr1.Size2(),arr2,arr2.Size2()); } //: Goto first element in array. // returns true if there is one. IntT RowIndex() const { return BufferAccess2dIter2C::RowIndex(arr1.ReferenceElm()); } //: Get index of current row. Index2dC Index() const { return BufferAccess2dIter2C::Index(arr1.ReferenceElm()); } //: Get current index. // This is a little slow. private: SArray2dC arr1; SArray2dC arr2; }; //////////////////////////////////////////////////////////////// } #endif