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


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

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

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

1.3
date	93.01.19.14.56.44;	author jnw;	state Exp;
branches;
next	1.2;

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

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


desc
@Initial revision
@


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

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


// $Log:	VectorDIPIter.h,v $
// Revision 1.5  93/04/17  18:45:16  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:35  thoth
// There are now two sorts of BaseDIIters.
// 
// Revision 1.3  93/01/19  14:56:44  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/12  17:04:30  jnw
// Modified to match new pixel/value iter style
// 
// Revision 1.1  92/10/05  11:46:10  jnw
// Initial revision
// 

#ifndef VectorDIPIter_h_
#define VectorDIPIter_h_

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

template <class T>
class IA_VectorDIPIter: public IA_BaseDIPIter<T> {
protected:
    // index stores the index of the current point within the value vector
    int index;

    // vdip points at the base image over which we're iterating.
    IA_VectorDI<T> *vdip() const { return (IA_VectorDI<T> *)domain; }

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

public:

    IA_VectorDIPIter(const IA_VectorDI<T> *);
    IA_VectorDIPIter(const IA_VectorDIPIter&);

    ~IA_VectorDIPIter() {}

    IA_BaseDIPIter<T> * clone_self() { return new IA_VectorDIPIter(*this); }

    int next(IA_IntPoint&, T&);

    void reset() { psiter.reset(); this->index = 0;}

    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
a27 4
    // curr stores the current point position of the iterator.
    // this is necessary for the second form of call of next.
    IA_IntPoint curr;

d31 2
a32 2
    // bdip points at the base image over which we're iterating.
    IA_VectorDI<T> *bdip;
a36 4
    // more is true if there are any points remaining to be returned
    // by next().
    int more;

d39 1
a39 1
    IA_VectorDIPIter(const IA_DiscreteImage<T> &, IA_VectorDI<T> *);
d48 1
a48 1
    void reset() { psiter.reset(); this->more=psiter(curr); this->index = 0;}
d50 1
a50 1
    IA_DiscreteImage<T> domain_() const { return this->domain; }
@


1.3
log
@Modified to support IA_ naming convention
@
text
@d4 3
d23 1
a23 1
class IA_VectorDIPIter: public IA_BaseDIIter<T> {
d49 1
a49 1
    IA_BaseDIIter<T> * clone_self() { return new IA_VectorDIPIter(*this); }
@


1.2
log
@Modified to match new pixel/value iter style
@
text
@d4 3
d20 1
a20 1
class VectorDIPIter: public BaseDIIter<T> {
d24 1
a24 1
    IntPoint curr;
d30 1
a30 1
    VectorDI<T> *bdip;
d33 1
a33 1
    IPSIter psiter;
d41 2
a42 2
    VectorDIPIter(const DiscreteImage<T> &, VectorDI<T> *);
    VectorDIPIter(const VectorDIPIter&);
d44 1
a44 1
    ~VectorDIPIter() {}
d46 1
a46 1
    BaseDIIter<T> * clone_self() { return new VectorDIPIter(*this); }
d48 1
a48 1
    int next(IntPoint&, T&);
d52 1
a52 1
    DiscreteImage<T> domain_() const { return this->domain; }
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d44 3
a46 5
    int next(T&) {
	abort();
	return 0;
    }
    int next(T&, IntPoint&);
@
