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


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

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


desc
@initial revision
@


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

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

#ifndef FunctionDIVIter_h_
#define FunctionDIVIter_h_

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

template <class T>
class IA_FunctionDIVIter: 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_FunctionDI<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_FunctionDIVIter(const IA_DiscreteImage<T> &, IA_FunctionDI<T> *);
    IA_FunctionDIVIter(const IA_FunctionDIVIter&);

    ~IA_FunctionDIVIter() {}

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

    int next(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 FunctionDIVIter: public BaseDIIter<T> {
d20 1
a20 1
    IntPoint curr;
d23 1
a23 1
    FunctionDI<T> *bdip;
d26 1
a26 1
    IPSIter psiter;
d34 2
a35 2
    FunctionDIVIter(const DiscreteImage<T> &, FunctionDI<T> *);
    FunctionDIVIter(const FunctionDIVIter&);
d37 1
a37 1
    ~FunctionDIVIter() {}
d39 1
a39 1
    BaseDIIter<T> * clone_self() { return new FunctionDIVIter(*this); }
d45 1
a45 1
    DiscreteImage<T> domain_() const { return this->domain; }
@
