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


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

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

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

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

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


desc
@ Created this new value iterator class
@


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

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

static char VectorDIVIterrcsid[] = "$Id: VectorDIVIter.c,v 1.4 93/04/17 18:45:17 thoth Exp Locker: thoth $";

// $Log:	VectorDIVIter.c,v $
// Revision 1.4  93/04/17  18:45:17  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.3  93/02/20  12:43:37  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.2  93/01/19  14:56:45  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.1  92/11/12  17:02:04  jnw
// Initial revision
// 
// Revision 1.1  92/10/05  11:46:12  jnw
// Initial revision
// 

#include "VectorDIVIter.h"

template <class T>
IA_VectorDIVIter<T>::IA_VectorDIVIter(const IA_VectorDI<T> *img)
: IA_BaseDIVIter<T>(img)
{
    this->num_left = this->domain->domain().card();
    this->index = 0;
}

template <class T>
IA_VectorDIVIter<T>::IA_VectorDIVIter(const IA_VectorDIVIter<T> &iter)
: IA_BaseDIVIter<T>(iter.domain)
{
    this->num_left = iter.num_left;
    this->index = iter.index;
}

template <class T>
int IA_VectorDIVIter<T>::next(T& pixel_value)
{
    if (this->num_left > 0) {
	pixel_value = this->vdip()->vec[this->index++];
	this->num_left--;
	return 1;
    } else {
	return 0;
    }
}
@


1.4
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
@a1 1
static char VectorDIVIterrcsid[] = "$Id: VectorDIVIter.c,v 1.3 93/02/20 12:43:37 thoth Exp Locker: thoth $";
d3 7
d11 4
@


1.3
log
@There are now two sorts of BaseDIIters.
@
text
@d2 1
a2 1
static char VectorDIVIterrcsid[] = "$Id: VectorDIVIter.c,v 1.2 93/01/19 14:56:45 jnw Exp Locker: thoth $";
d5 3
d21 1
a21 2
IA_VectorDIVIter<T>::IA_VectorDIVIter(const IA_DiscreteImage<T>& img,
				      IA_VectorDI<T> *b)
d24 1
a24 2
    this->num_left = this->domain.card();
    this->bdip = b;
a32 1
    this->bdip = iter.bdip;
d39 3
a41 2
    if (this->num_left-- > 0) {
	pixel_value = this->bdip->vec[this->index++];
@


1.2
log
@Modified to support IA_ naming convention
@
text
@d2 1
a2 1
static char VectorDIVIterrcsid[] = "$Id: VectorDIVIter.c,v 1.1 92/11/12 17:02:04 jnw Exp Locker: jnw $";
d5 3
d20 1
a20 1
: IA_BaseDIIter<T>(img)
d29 1
a29 1
: IA_BaseDIIter<T>(iter.domain)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char VectorDIVIterrcsid[] = "$Id: VectorDIVIter.c,v 1.1 92/10/05 11:46:12 jnw Exp Locker: jnw $";
d5 3
d15 3
a17 2
VectorDIVIter<T>::VectorDIVIter(const DiscreteImage<T>& img, VectorDI<T> *b)
: BaseDIIter<T>(img)
d25 2
a26 2
VectorDIVIter<T>::VectorDIVIter(const VectorDIVIter<T> &iter)
: BaseDIIter<T>(iter.domain)
d34 1
a34 1
int VectorDIVIter<T>::next(T& pixel_value)
@
