head	1.17;
access;
symbols
	r2_1:1.15
	r2_0:1.15
	r1_1_beta:1.14
	r1_1_alpha:1.14
	r1_0:1.14
	r0_11:1.14
	r0_10:1.14
	r0_9:1.14
	Eglin_alpha_1:1.11;
locks; strict;
comment	@// @;


1.17
date	94.11.10.19.53.56;	author ljr;	state Exp;
branches;
next	1.16;

1.16
date	94.10.06.17.39.00;	author fjsoria;	state Exp;
branches;
next	1.15;

1.15
date	94.08.26.15.37.08;	author thoth;	state Exp;
branches;
next	1.14;

1.14
date	93.11.17.18.06.36;	author thoth;	state Exp;
branches;
next	1.13;

1.13
date	93.08.08.13.15.51;	author thoth;	state Exp;
branches;
next	1.12;

1.12
date	93.07.15.11.44.37;	author thoth;	state Exp;
branches;
next	1.11;

1.11
date	93.05.28.15.05.27;	author thoth;	state Exp;
branches;
next	1.10;

1.10
date	93.05.27.18.05.39;	author thoth;	state Exp;
branches;
next	1.9;

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

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

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

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

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

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

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

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

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


desc
@CFrontified version
@


1.17
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: PSIter.c,v 1.16 1994/10/06 17:39:00 fjsoria Exp ljr $";
#endif

// 
// $Log: PSIter.c,v $
// Revision 1.16  1994/10/06  17:39:00  fjsoria
// commented rscid[] line
//
// Revision 1.15  1994/08/26  15:37:08  thoth
// DOS-inspired name rework (internal files)
//
// Revision 1.14  1993/11/17  18:06:36  thoth
// *** empty log message ***
//
// Revision 1.13  1993/08/08  13:15:51  thoth
// Parametrization of the iterator class.
//
// Revision 1.12  93/07/15  11:44:37  thoth
// new iterator virtual method from BasePS is superior to case statement.
// 
// Revision 1.11  93/05/28  15:05:27  thoth
// removed dependency on with-ia-pointset*
// 
// Revision 1.10  93/05/27  18:05:39  thoth
// eliminated dependency on internal testing file.
// 
// Revision 1.9  93/05/26  16:57:44  thoth
// Copyright Notices
// 
// Revision 1.8  93/04/29  12:50:00  thoth
// Mondo PointSets are now templatized.
// 
// Revision 1.7  93/04/16  15:50:16  thoth
// use IA_IntPoint instead of IntPoint.
// 
// Revision 1.6  93/02/12  16:25:15  thoth
// more IA_ prefixes.
// more comments.
// 
// Revision 1.5  92/12/16  14:48:06  thoth
// conversion to IA_ mostly complete
// 
// Revision 1.4  92/09/30  10:28:44  thoth
// White and Black holes are now semi-public classes, unfortunately.
// type() system now based on address of static data member.
// 
// Revision 1.3  92/09/03  13:34:10  thoth
// I unnamed unused formal parameters
// 
// Revision 1.2  92/08/26  13:43:10  thoth
// meaningful exception types.
// 
// Revision 1.1  92/08/23  13:30:08  thoth
// Initial revision
// 
// 

#include "PSIter.h"
#if 0
#include "BoxyIPSIter.h"
#include "YIPSIter.h"
#include "MondoPS.h"
#endif

#ifdef IA_PRII
#pragma implementation
#endif

/*template <class P>
IA_BasePSIter<P> * IA_PSIter<P>::make_iter(const IA_Set<P> & ips)
{
    return ips.ps->iterator();
}*/


template <class P>
IA_PSIter<P>::IA_PSIter()
{
    iter = make_iter(IA_Set<P>());
}


template <class P>
IA_PSIter<P> & IA_PSIter<P>::operator=(const IA_Set<P> &x)
{
    delete this->iter;

    this->iter = make_iter(x);

    return *this;
}

template <class P>
IA_PSIter<P> & IA_PSIter<P>::operator=(const IA_PSIter<P> &x)
{
    if (x.iter==this->iter)
	return *this;

    delete this->iter;

    this->iter = x.iter->clone_self();

    return *this;
}

template <class P>
IA_Set<P> IA_PSIter<P>::domain() const
{
    return iter->domain_();
}
@


1.16
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: PSIter.c,v 1.15 1994/08/26 15:37:08 thoth Exp fjsoria $";
d16 3
@


1.15
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: PSIter.c,v 1.14 1993/11/17 18:06:36 thoth Exp thoth $";
d14 3
d74 1
a74 1
template <class P>
d78 1
a78 1
}
@


1.14
log
@*** empty log message ***
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: PSIter.c,v 1.13 1993/08/08 13:15:51 thoth Exp thoth $";
d14 3
d63 1
a63 1
#include "YoderIPSIter.h"
@


1.13
log
@Parametrization of the iterator class.
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: IPSIter.c,v 1.12 93/07/15 11:44:37 thoth Exp Locker: thoth $";
d13 4
a16 1
// $Log:	IPSIter.c,v $
d57 1
a57 1
#include "IPSIter.h"
@


1.12
log
@new iterator virtual method from BasePS is superior to case statement.
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: IPSIter.c,v 1.11 93/05/28 15:05:27 thoth Exp Locker: thoth $";
d14 3
d55 1
d59 1
d65 2
a66 1
IA_BaseIPSIter * IA_IPSIter::make_iter(const IA_IntPointSet & ips)
a67 16
#if 0
    IA_PointSetType	itype=ips.type();
    if (itype==IA_BoxyIPS::s_type())
	return new IA_BoxyIPSIter(ips,(IA_BoxyIPS*)ips.ps);
    else if (itype==IA_YoderIPS::s_type())
	return new IA_YoderIPSIter(ips,(IA_YoderIPS*)ips.ps);
    else if (itype==IA_WhiteHole_<IA_IntPoint>::s_type())
	return new WhiteIter(ips);
    else if (itype==IA_BlackHole_<IA_IntPoint>::s_type())
	return new BlackIter(ips);
    else {
	// AUGH!!
	ia_throw(IA::PSET_REQUIRE_EXTENSIVE, __FILE__, __LINE__);
	return 0;
    }
#else
a68 1
#endif
d71 3
a73 1
IA_IPSIter & IA_IPSIter::operator=(const IA_IntPointSet &x)
d75 7
d89 2
a90 1
IA_IPSIter & IA_IPSIter::operator=(const IA_IPSIter &x)
d100 6
@


1.11
log
@removed dependency on with-ia-pointset*
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: IPSIter.c,v 1.10 93/05/27 18:05:39 thoth Exp Locker: thoth $";
d14 3
a59 31
#define WhiteIter IA_WhiteIter
#define BlackIter IA_BlackIter

class WhiteIter: public IA_BaseIPSIter {
private:
    int	done;
public:
    WhiteIter(const IA_IntPointSet&ps): IA_BaseIPSIter(ps) { done=0; }
    IA_BaseIPSIter *clone_self() { return new WhiteIter(domain); }
    int next(IA_IntPoint& ip) {
	if (done)
	    return 0;
	else {
	    ip = IA_IntPoint();
	    done = 1;
	    return 1;
	}
    }
    void reset() { done=0; }
};

class BlackIter: public IA_BaseIPSIter {
public:
    BlackIter(const IA_IntPointSet&ps): IA_BaseIPSIter(ps) {}
    IA_BaseIPSIter *clone_self() { return new BlackIter(domain); }
    int next(IA_IntPoint&) {
	return 0;
    }
    void reset() {}
};

d62 1
d77 3
@


1.10
log
@eliminated dependency on internal testing file.
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: IPSIter.c,v 1.9 93/05/26 16:57:44 thoth Exp Locker: thoth $";
d14 3
d60 1
a60 3
#include "with-ia-pointset-P.h"

class WhiteIter: public BaseIPSIter {
d64 2
a65 2
    WhiteIter(const IntPointSet&ps): BaseIPSIter(ps) { done=0; }
    BaseIPSIter *clone_self() { return new WhiteIter(domain); }
d78 1
a78 1
class BlackIter: public BaseIPSIter {
d80 2
a81 2
    BlackIter(const IntPointSet&ps): BaseIPSIter(ps) {}
    BaseIPSIter *clone_self() { return new BlackIter(domain); }
d88 1
a88 1
BaseIPSIter * IPSIter::make_iter(const IntPointSet & ips)
d91 4
a94 4
    if (itype==BoxyIPS::s_type())
	return new BoxyIPSIter(ips,(BoxyIPS*)ips.ps);
    else if (itype==YoderIPS::s_type())
	return new YoderIPSIter(ips,(YoderIPS*)ips.ps);
d106 1
a106 1
IPSIter & IPSIter::operator=(const IntPointSet &x)
d115 1
a115 1
IPSIter & IPSIter::operator=(const IPSIter &x)
@


1.9
log
@Copyright Notices
@
text
@d10 1
a10 1
static char rcsid[] = "$Id: IPSIter.c,v 1.8 93/04/29 12:50:00 thoth Exp Locker: thoth $";
d14 3
a44 1
#include "dev-frags.h"
@


1.8
log
@Mondo PointSets are now templatized.
@
text
@a1 1
static char rcsid[] = "$Id: IPSIter.c,v 1.7 93/04/16 15:50:16 thoth Exp Locker: thoth $";
d3 9
d14 3
@


1.7
log
@use IA_IntPoint instead of IntPoint.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.c,v 1.6 93/02/12 16:25:15 thoth Exp Locker: thoth $";
d6 3
d81 1
a81 1
    else if (itype==_WhiteHole::s_type())
d83 1
a83 1
    else if (itype==_BlackHole::s_type())
@


1.6
log
@more IA_ prefixes.
more comments.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.c,v 1.5 92/12/16 14:48:06 thoth Exp Locker: thoth $";
d6 4
d49 1
a49 1
    int next(IntPoint& ip) {
d53 1
a53 1
	    ip = IntPoint();
d65 1
a65 1
    int next(IntPoint&) {
@


1.5
log
@conversion to IA_ mostly complete
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.c,v 1.4 92/09/30 10:28:44 thoth Exp Locker: thoth $";
d6 3
d69 1
a69 1
    PointSetType	itype=ips.type();
@


1.4
log
@White and Black holes are now semi-public classes, unfortunately.
type() system now based on address of static data member.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.c,v 1.3 92/09/03 13:34:10 thoth Exp Locker: thoth $";
d6 4
d30 5
@


1.3
log
@I unnamed unused formal parameters
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.C,v 1.2 92/08/26 13:43:10 thoth Exp Locker: thoth $";
d5 4
a8 1
// $Log:	IPSIter.C,v $
d21 1
d57 2
a58 2
    switch (ips.type()) {
    case BOXY:
d60 1
a60 1
    case YODER:
d62 1
a62 1
    case WHITE:
d64 1
a64 1
    case BLACK:
d66 1
a66 1
    default:
@


1.2
log
@meaningful exception types.
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.C,v 1.1 92/08/23 13:30:08 thoth Exp Locker: thoth $";
d6 3
d45 1
a45 1
    int next(IntPoint& ip) {
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: IPSIter.cc,v 1.3 92/08/14 15:48:11 thoth Exp $";
d5 3
a7 1
// $Log:	IPSIter.cc,v $
d9 1
d61 1
a61 1
	abort();
@
