#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Core/Container/SArray/SArr2Iter3.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_SARR2ITER3_HEADER #define RAVL_SARR2ITER3_HEADER 1 //////////////////////////////////////////////////////////// //! docentry="Ravl.Core.Arrays.2D" //! rcsid="$Id: SArr2Iter3.hh,v 1.3 2002/06/18 10:37:22 craftit Exp $ //! file="Ravl/Core/Container/SArray/SArr2Iter3.hh" //! lib=RavlCore //! author="Charles Galambos" //! date="10/09/1998" //! userlevel=Advanced #include "Ravl/SArray2d.hh" namespace RavlN { //! userlevel=Advanced //: Triple SArray2dC iterator. // Triple Simple 2d array iterator. template class SArray2dIter3C : public BufferAccess2dIter3C { public: SArray2dIter3C() {} //: Default constructor. SArray2dIter3C(const SArray2dC &arr, const SArray2dC &narr2, const SArray2dC &narr3) : arr1(arr), arr2(narr2), arr3(narr3) { First(); } //: Constructor. inline bool First() { return BufferAccess2dIter3C::First(arr1,arr1.Size2(), arr2,arr2.Size2(), arr3,arr3.Size2()); } //: Goto first element in array. // returns true if there is a first element. IntT RowIndex() const { return BufferAccess2dIter3C::RowIndex(arr1.ReferenceElm()); } //: Get index of current row. Index2dC Index() const { return BufferAccess2dIter3C::Index(arr1.ReferenceElm()); } //: Get current index. // This is a little slow. protected: SArray2dC arr1; SArray2dC arr2; SArray2dC arr3; }; //////////////////////////////////////////////////////////////// } #endif