head	1.2;
access;
symbols
	bobbase:1.2
	bob:1.2
	r2_1:1.2
	r2_0:1.2
	r1_1_beta:1.2
	r1_1_alpha:1.2
	r1_0:1.2
	r0_11:1.2
	r0_10:1.2
	r0_9:1.2;
locks; strict;
comment	@// @;


1.2
date	93.11.17.18.29.31;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.09.15.12.58.01;	author thoth;	state Exp;
branches;
next	;


desc
@Vector image iterator declaration.
@


1.2
log
@IPSIter is now PSIter<IntPoint>.
@
text
@// Emacs: -*- C++ -*-

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


// $Log: VectorImageIter.h,v $
// Revision 1.1  1993/09/15  12:58:01  thoth
// Initial revision
//

#ifndef VectorImageIter_h_
#define VectorImageIter_h_

#include <stdlib.h>
#include "PSIter.h"
#include "BaseImageIter.h"
#include "VectorI.h"

template < class P,class T>
class IA_VectorIVIter: public IA_BaseIVIter<P,T> {
protected:
    // num_left stores the number of points in this image\'s PointSet
    // remaining to be iterated.
    int num_left;

    // index stores the index of the current point within the value vector
    int index;

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

public:

    IA_VectorIVIter(const IA_VectorI<P,T> *);
    IA_VectorIVIter(const IA_VectorIVIter&);

    ~IA_VectorIVIter() {}

    IA_BaseIVIter<P,T> * clone_self() { return new IA_VectorIVIter(*this); }
    int next(T&);
    void reset() { this->num_left = this->domain->domain().card();
		   this->index =0; }

    IA_BaseImage<P,T> *domain_() const { return this->domain; }
};

template < class P,class T>
class IA_VectorIPIter: public IA_BaseIPIter<P,T> {
protected:
    // index stores the index of the current point within the value vector
    int index;

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

    // psiter is an iterator over bdip's PointSet.
    IA_PSIter<P> psiter;

public:

    IA_VectorIPIter(const IA_VectorI<P,T> *);
    IA_VectorIPIter(const IA_VectorIPIter&);

    ~IA_VectorIPIter() {}

    IA_BaseIPIter<P,T> * clone_self() { return new IA_VectorIPIter(*this); }

    int next(P&, T&);

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

    IA_BaseImage<P,T> *domain_() const { return this->domain; }
};

#endif
@


1.1
log
@Initial revision
@
text
@d9 4
a12 1
// $Log:	VectorIVIter.h,v $
d18 1
a18 1
#include "IPSIter.h"
@
