head	1.6;
access;
symbols
	r0_10:1.6
	Eglin_alpha_1:1.6;
locks; strict;
comment	@// @;


1.6
date	93.05.27.11.19.31;	author thoth;	state Exp;
branches;
next	1.5;

1.5
date	93.04.17.18.46.58;	author thoth;	state Exp;
branches;
next	1.4;

1.4
date	93.02.20.12.43.32;	author thoth;	state Exp;
branches;
next	1.3;

1.3
date	93.02.08.12.56.04;	author thoth;	state Exp;
branches;
next	1.2;

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

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


desc
@n
Created this new value iterator
@


1.6
log
@Copyright Notices
@
text
@// Emacs: -*- C++ -*-

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


// $Log:	ConstDIVIter.h,v $
// Revision 1.5  93/04/17  18:46:58  thoth
// Iterator support is no longer based on a switch statement.  We now
// use a virtual method.  The user can now provide faster iterators.
// 
// Revision 1.4  93/02/20  12:43:32  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.3  93/02/08  12:56:04  thoth
// order of arguments was confused.
// 
// Revision 1.2  93/01/19  14:55:53  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.1  92/11/12  17:04:55  jnw
// Initial revision
// 
// Revision 1.1  92/10/05  11:45:54  jnw
// Initial revision
// 

#ifndef ConstDIVIter_h_
#define ConstDIVIter_h_

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


template <class T>
class IA_ConstDIVIter: public IA_BaseDIVIter<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_ConstDI<T> *cdip() const { return (IA_ConstDI<T> *)domain; }

public:

    IA_ConstDIVIter(const IA_ConstDI<T> *);
    IA_ConstDIVIter(const IA_ConstDIVIter&);

    ~IA_ConstDIVIter() {}

    IA_BaseDIVIter<T> * clone_self() { return new IA_ConstDIVIter(*this); }
    int next(T&);

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

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

#endif
@


1.5
log
@Iterator support is no longer based on a switch statement.  We now
use a virtual method.  The user can now provide faster iterators.
@
text
@d3 6
d10 4
@


1.4
log
@There are now two sorts of BaseDIIters.
@
text
@d4 3
d37 1
a37 1
    IA_ConstDI<T> *bdip;
d41 1
a41 1
    IA_ConstDIVIter(const IA_DiscreteImage<T> &, IA_ConstDI<T> *);
d49 1
a49 1
    void reset() { this->num_left= this->domain.card(); }
d51 1
a51 1
    IA_DiscreteImage<T> domain_() const { return this->domain; }
@


1.3
log
@order of arguments was confused.
@
text
@d4 3
d27 1
a27 1
class IA_ConstDIVIter: public IA_BaseDIIter<T> {
d43 1
a43 1
    IA_BaseDIIter<T> * clone_self() { return new IA_ConstDIVIter(*this); }
a44 6

    int next(IA_IntPoint&, T&) {
	// add ia_throw call
	abort();
	return 0;
    }
@


1.2
log
@Modified to support IA_ naming convention
@
text
@d4 3
d43 1
a43 1
    int next(T&, IA_IntPoint&) {
@


1.1
log
@Initial revision
@
text
@d4 3
d21 1
a21 1
class ConstDIVIter: public BaseDIIter<T> {
d28 1
a28 1
    ConstDI<T> *bdip;
d32 2
a33 2
    ConstDIVIter(const DiscreteImage<T> &, ConstDI<T> *);
    ConstDIVIter(const ConstDIVIter&);
d35 1
a35 1
    ~ConstDIVIter() {}
d37 1
a37 1
    BaseDIIter<T> * clone_self() { return new ConstDIVIter(*this); }
d40 1
a40 1
    int next(T&, IntPoint&) {
d48 1
a48 1
    DiscreteImage<T> domain_() const { return this->domain; }
@
