head	1.2;
access;
symbols
	bobbase:1.2
	bob:1.2
	r2_1:1.2
	r2_0:1.2
	r1_1_beta:1.2
	r1_1_alpha:1.2
	r1_0:1.2
	r0_11:1.2
	r0_10:1.2
	r0_9:1.2;
locks; strict;
comment	@// @;


1.2
date	93.11.17.18.14.05;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.09.15.12.51.29;	author thoth;	state Exp;
branches;
next	;


desc
@Constant image iterator declaration.
@


1.2
log
@IPSIter is now PSIter<IntPoint>.
@
text
@// Emacs: -*- C++ -*-

//
//	Copyright 1993, Center for Computer Vision and Visualization,
//	University of Florida.  All rights reserved.
//


// $Log: ConstImageIter.h,v $
// Revision 1.1  1993/09/15  12:51:29  thoth
// Initial revision
//

#ifndef ConstImageIter_h_
#define ConstImageIter_h_

#include <stdlib.h>
#include "PSIter.h"
#include "BaseImageIter.h"
#include "ConstI.h"


template < class P,class T>
class IA_ConstIVIter: public IA_BaseIVIter<P,T> {
protected:
    // num_left stores the number of elements in the image\'s pointset
    // over which we must still iterate
    int num_left;

    // bdip points at the base image over which we're iterating.
    IA_ConstI<P,T> *cip() const { return (IA_ConstI<P,T> *)domain; }

public:

    IA_ConstIVIter(const IA_ConstI<P,T> *);
    IA_ConstIVIter(const IA_ConstIVIter&);

    ~IA_ConstIVIter() {}

    IA_BaseIVIter<P,T> * clone_self() { return new IA_ConstIVIter(*this); }
    int next(T&);

    void reset() { this->num_left= this->domain->domain().card(); }

    IA_BaseImage<P,T> *domain_() const { return this->domain; }
};


template < class P,class T>
class IA_ConstIPIter: public IA_BaseIPIter<P,T> {
protected:
    // bdip points at the base image over which we're iterating.
    IA_ConstI<P,T> *cip() const { return (IA_ConstI<P,T>*)domain; }
    
    // psiter is an iterator over bdip's PointSet.
    IA_PSIter<P> psiter;
    
public:
    
    IA_ConstIPIter(const IA_ConstI<P,T> *);
    IA_ConstIPIter(const IA_ConstIPIter&);
    
    ~IA_ConstIPIter() {}
    
    IA_BaseIPIter<P,T> * clone_self() { return new IA_ConstIPIter(*this); }
    
    int next(P&, T&);
    void reset() { psiter.reset(); }
    
    IA_BaseImage<P,T> *domain_() const { return this->domain; }
};

#endif
@


1.1
log
@Initial revision
@
text
@d9 4
a12 1
// $Log:	ConstDIVIter.h,v $
d18 1
a18 1
#include "IPSIter.h"
@
