head	1.11;
access;
symbols
	r2_1:1.9
	r2_0:1.9
	r1_1_beta:1.8
	r1_1_alpha:1.7
	r1_0:1.7
	r0_11:1.7
	r0_10:1.7
	r0_9:1.7
	Eglin_alpha_1:1.5;
locks; strict;
comment	@// @;


1.11
date	94.11.10.19.53.56;	author ljr;	state Exp;
branches;
next	1.10;

1.10
date	94.10.06.17.39.00;	author fjsoria;	state Exp;
branches;
next	1.9;

1.9
date	94.08.26.15.37.08;	author thoth;	state Exp;
branches;
next	1.8;

1.8
date	94.07.25.16.58.52;	author thoth;	state Exp;
branches;
next	1.7;

1.7
date	93.11.17.18.07.04;	author thoth;	state Exp;
branches;
next	1.6;

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

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

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

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

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

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


desc
@CFrontified version
@


1.11
log
@Added IA_NO_RCS_STATIC_DATA guard.
@
text
@// Emacs: -*- C++ -*-

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

#ifndef IA_NO_RCS_STATIC_DATA
static char copyright[] = "Copyright 1993, Center for Computer Vision and Visualization,\nUniversity of Florida.  All rights reserved.\n";

static char rcsid[] = "$Id: YIPSIter.c,v 1.10 1994/10/06 17:39:00 fjsoria Exp ljr $";
#endif

// 
// $Log: YIPSIter.c,v $
// Revision 1.10  1994/10/06  17:39:00  fjsoria
// commented rscid[] line
//
// Revision 1.9  1994/08/26  15:37:08  thoth
// DOS-inspired name rework (internal files)
//
// Revision 1.8  1994/07/25  16:58:52  thoth
// \Name sanitization
//
// Revision 1.7  1993/11/17  18:07:04  thoth
// IPSIter is now PSIter<IntPoint>
//
// Revision 1.6  1993/07/15  11:40:16  thoth
// new BasePSIter implementation.
//
// Revision 1.5  93/05/28  15:05:34  thoth
// removed dependency on with-ia-pointset*
// 
// Revision 1.4  93/05/26  16:57:53  thoth
// Copyright Notices
// 
// Revision 1.3  93/04/16  15:50:28  thoth
// use IA_IntPoint instead of IntPoint.
// 
// Revision 1.2  92/12/16  14:48:28  thoth
// conversion to IA_ mostly complete
// 
// Revision 1.1  92/08/23  13:30:21  thoth
// Initial revision
// 
// 

#include "PSIter.h"
#include "YIPSIter.h"

#ifdef IA_PRII
#pragma implementation
#endif

IA_YoderIPSIter::IA_YoderIPSIter(IA_YoderIPS *y)
:IA_BasePSIter<IA_Point<int> >(y)
{
    curr = yoder()->lastbefore+1;
    sliceidx = 0;
    subiter = 0;
}

IA_YoderIPSIter::IA_YoderIPSIter(const IA_YoderIPSIter &x)
:IA_BasePSIter<IA_Point<int> >(x.domain)
{
    curr = x.curr;
    sliceidx = x.sliceidx;
    subiter = x.subiter ? (new IA_PSIter<IA_Point<int> >(*x.subiter)) : 0;
}

int IA_YoderIPSIter::next(IA_Point<int>& ip)
{
    while (sliceidx < yoder()->nslices) {
	if (!subiter) {
	    // cout << "\n [" << yoder()->dimen << "]new slice at " << curr << " index " << sliceidx << ' ';
	    subiter = new IA_PSIter<IA_Point<int> >(yoder()->slices[sliceidx].shadow);
	}

	if ((*subiter)(ip)) {
	    ip = concat(curr,ip);
	    return 1;
	}

	// empty() optimization
	if (yoder()->slices[sliceidx].shadow.empty())
	    curr = 1+ yoder()->slices[sliceidx].last;
	else
	    curr++;
	
	if (curr<= yoder()->slices[sliceidx].last) {
	    // cout << "\n [" << yoder()->dimen << "]resetting slice iter for new curr" << curr << ' ';
	    subiter->reset();
	    continue;
	}

	delete subiter;
	subiter=0;

	sliceidx++;
    }
#if 0
    // gratuitous
    if (subiter) {
	delete subiter;
	subiter=0;
    }
#endif
    return 0;
}
@


1.10
log
@commented rscid[] line
@
text
@d8 2
a9 1
//static char copyright[] = "Copyright 1993, Center for Computer Vision and Visualization,\nUniversity of Florida.  All rights reserved.\n";
d11 2
a12 1
//static char rcsid[] = "$Id: YIPSIter.c,v 1.9 1994/08/26 15:37:08 thoth Exp fjsoria $";
d16 3
@


1.9
log
@DOS-inspired name rework (internal files)
@
text
@d8 1
a8 1
static char copyright[] = "Copyright 1993, Center for Computer Vision and Visualization,\nUniversity of Florida.  All rights reserved.\n";
d10 1
a10 1
static char rcsid[] = "$Id: YIPSIter.c,v 1.8 1994/07/25 16:58:52 thoth Exp thoth $";
d14 3
@


1.8
log
@\Name sanitization
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.7 1993/11/17 18:07:04 thoth Exp thoth $";
d13 4
a16 1
// $Log: YoderIPSIter.c,v $
d41 1
a41 1
#include "YoderIPSIter.h"
@


1.7
log
@IPSIter is now PSIter<IntPoint>
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.6 1993/07/15 11:40:16 thoth Exp thoth $";
d14 3
d45 1
a45 1
:IA_BasePSIter<IA_IntPoint>(y)
d53 1
a53 1
:IA_BaseIPSIter(x.domain)
d57 1
a57 1
    subiter = x.subiter ? (new IA_PSIter<IA_IntPoint>(*x.subiter)) : 0;
d60 1
a60 1
int IA_YoderIPSIter::next(IA_IntPoint& ip)
d65 1
a65 1
	    subiter = new IA_PSIter<IA_IntPoint>(yoder()->slices[sliceidx].shadow);
a72 1
	curr++;
d74 4
@


1.6
log
@new BasePSIter implementation.
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.5 93/05/28 15:05:34 thoth Exp Locker: thoth $";
d13 4
a16 1
// $Log:	YoderIPSIter.c,v $
d34 1
a34 1
#include "IPSIter.h"
d54 1
a54 1
    subiter = x.subiter ? (new IA_IPSIter(*x.subiter)) : 0;
d62 1
a62 1
	    subiter = new IA_IPSIter(yoder()->slices[sliceidx].shadow);
@


1.5
log
@removed dependency on with-ia-pointset*
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.4 93/05/26 16:57:53 thoth Exp Locker: thoth $";
d14 3
d38 2
a39 2
IA_YoderIPSIter::IA_YoderIPSIter(const IA_IntPointSet &ips, IA_YoderIPS *y)
:IA_BaseIPSIter(ips)
d41 1
a41 3
    yoder = y;

    curr = yoder->lastbefore+1;
a48 1
    yoder = x.yoder;
d56 1
a56 1
    while (sliceidx < yoder->nslices) {
d58 2
a59 2
	    // cout << "\n [" << yoder->dimen << "]new slice at " << curr << " index " << sliceidx << ' ';
	    subiter = new IA_IPSIter(yoder->slices[sliceidx].shadow);
d70 2
a71 2
	if (curr<= yoder->slices[sliceidx].last) {
	    // cout << "\n [" << yoder->dimen << "]resetting slice iter for new curr" << curr << ' ';
@


1.4
log
@Copyright Notices
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.3 93/04/16 15:50:28 thoth Exp Locker: thoth $";
d14 3
d35 2
a36 4
#include "with-ia-pointset-P.h"

YoderIPSIter::IA_YoderIPSIter(const IntPointSet &ips, YoderIPS *y)
:BaseIPSIter(ips)
d45 2
a46 2
YoderIPSIter::IA_YoderIPSIter(const YoderIPSIter &x)
:BaseIPSIter(x.domain)
d51 1
a51 1
    subiter = x.subiter ? (new IPSIter(*x.subiter)) : 0;
d54 1
a54 1
int YoderIPSIter::next(IA_IntPoint& ip)
d59 1
a59 1
	    subiter = new IPSIter(yoder->slices[sliceidx].shadow);
@


1.3
log
@use IA_IntPoint instead of IntPoint.
@
text
@a1 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.2 92/12/16 14:48:28 thoth Exp Locker: thoth $";
d3 9
d14 3
@


1.2
log
@conversion to IA_ mostly complete
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: YoderIPSIter.c,v 1.1 92/08/23 13:30:21 thoth Exp Locker: thoth $";
d6 3
d42 1
a42 1
int YoderIPSIter::next(IntPoint& ip)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: YoderIPSIter.cc,v 1.2 92/08/14 15:48:07 thoth Exp $";
d5 3
a7 1
// $Log:	YoderIPSIter.cc,v $
d9 1
d18 3
a20 1
YoderIPSIter::YoderIPSIter(const IntPointSet &ips, YoderIPS *y)
d30 1
a30 1
YoderIPSIter::YoderIPSIter(const YoderIPSIter &x)
@
