head     1.2;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @// @;


1.2
date     93.01.19.14.56.25;  author jnw;  state Exp;
branches ;
next     1.1;

1.1
date     92.11.14.09.36.25;  author jnw;  state Exp;
branches ;
next     ;


desc
@initial revision
@


1.2
log
@Modified to support IA_ naming convention
@
text
@// Emacs: -*- C++ -*-

// $Log:	FunctionRefDIPIter.h,v $
// Revision 1.1  92/11/14  09:36:25  jnw
// Initial revision
// 

#ifndef FunctionRefDIPIter_h_
#define FunctionRefDIPIter_h_

#include <stdlib.h>
#include "IPSIter.h"
#include "BaseDIIter.h"
#include "FunctionRefDI.h"

template <class T>
class IA_FunctionRefDIPIter: public IA_BaseDIIter<T> {
protected:
    // curr stores the current point position of the iterator.
    IA_IntPoint curr;

    // bdip points at the base image over which we're iterating.
    IA_FunctionRefDI<T> *bdip;

    // psiter is an iterator over bdip's PointSet.
    IA_IPSIter psiter;

    // more is true if there are any points remaining to be returned
    // by next().
    int more;

public:

    IA_FunctionRefDIPIter(const IA_DiscreteImage<T> &, IA_FunctionRefDI<T> *);
    IA_FunctionRefDIPIter(const IA_FunctionRefDIPIter&);

    ~IA_FunctionRefDIPIter() {}

    IA_BaseDIIter<T> * clone_self() {
	return new IA_FunctionRefDIPIter(*this);
    }

    int next(IntPoint&, T&);

    void reset() { psiter.reset(); this->more=psiter(curr);}

    IA_DiscreteImage<T> domain_() const { return this->domain; }
};

#endif
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d17 1
a17 1
class FunctionRefDIPIter: public BaseDIIter<T> {
d20 1
a20 1
    IntPoint curr;
d23 1
a23 1
    FunctionRefDI<T> *bdip;
d26 1
a26 1
    IPSIter psiter;
d34 2
a35 2
    FunctionRefDIPIter(const DiscreteImage<T> &, FunctionRefDI<T> *);
    FunctionRefDIPIter(const FunctionRefDIPIter&);
d37 1
a37 1
    ~FunctionRefDIPIter() {}
d39 3
a41 1
    BaseDIIter<T> * clone_self() { return new FunctionRefDIPIter(*this); }
d47 1
a47 1
    DiscreteImage<T> domain_() const { return this->domain; }
@
