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


1.15
date	94.10.06.17.37.52;	author fjsoria;	state Exp;
branches;
next	1.14;

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

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

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

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

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

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

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

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

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

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

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

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

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

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


desc
@The IntPointSet iterator container class.
@


1.15
log
@commented rcsid[]
@
text
@// Emacs: -*- C++ -*-

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


// 
// $Log: PSIter.h,v $
// Revision 1.14  1994/08/18  23:39:28  thoth
// DOS-inspired filename rework
//
// Revision 1.13  1994/07/25  16:58:52  thoth
// \Name sanitization
//
// Revision 1.12  1994/03/30  13:47:16  thoth
// Renamed files to BasePSIter.
//
// Revision 1.11  1993/11/17  18:06:44  thoth
// make_iter is inline due to cfront bug.
//
// Revision 1.10  1993/08/08  13:17:18  thoth
// Parametrization of the iterator class.
//
// Revision 1.9  93/05/26  16:51:28  thoth
// Copyright Notices
// 
// Revision 1.8  93/04/17  14:52:56  thoth
// Use IA_IntPoint instead of IntPoint
// 
// Revision 1.7  93/02/12  16:25:23  thoth
// more IA_ prefixes.
// more comments.
// 
// Revision 1.6  92/12/16  14:48:07  thoth
// conversion to IA_ mostly complete
// 
// Revision 1.5  92/12/07  12:07:56  thoth
// the domain method is now const (like it should be)
// 
// Revision 1.4  92/08/23  13:30:11  thoth
// CFrontified version
// 
// 

#ifndef IPSIter_h_
#define IPSIter_h_

#ifdef IA_PRII
#pragma interface
#endif

#include "BasePSIter.h"

#include "IntPS.h"
#include "DblPS.h"

template <class P>
class IA_PSIter {
  protected:
    IA_BasePSIter<P>	*iter;
    
    static IA_BasePSIter<P> * make_iter(const IA_Set<P> & ips) {
	return ips.ps->iterator();
    }
  public:
    IA_PSIter();
    IA_PSIter(const IA_Set<P> &ips) { this->iter = make_iter(ips); }
    IA_PSIter(const IA_PSIter<P> &x) { this->iter = x.iter->clone_self(); }
    ~IA_PSIter() { delete iter; }
    
    IA_PSIter<P>& operator=(const IA_Set<P> &);
    IA_PSIter<P>& operator=(const IA_PSIter<P> &);
    
    IA_Set<P> domain() const;
    
    int operator() (P& ip) { return iter->next(ip); }
    void reset() { iter->reset(); }
};

/* sample usage:

   PointSet	blah;

   ...

   IA_PSIter<P>	scan(blah);
   IA_Point<int>	i;

   while (scan(i)) {
     frob(i);
   }

 */

#endif
@


1.14
log
@DOS-inspired filename rework
@
text
@d11 3
d64 2
a65 2
    static IA_BasePSIter<P> * make_iter(const IA_Set<P>&ps) {
	return ps.ps->iterator();
@


1.13
log
@\Name sanitization
@
text
@d11 3
d53 2
a54 2
#include "IntPointSet.h"
#include "DoublePointSet.h"
@


1.12
log
@Renamed files to BasePSIter.
@
text
@d11 3
d51 1
a51 1
#include "FloatPointSet.h"
d83 1
a83 1
   IA_IntPoint	i;
@


1.11
log
@make_iter is inline due to cfront bug.
@
text
@d11 3
d45 1
a45 1
#include "BaseIPSIter.h"
@


1.10
log
@Parametrization of the iterator class.
@
text
@d10 4
a13 1
// $Log:	IPSIter.h,v $
d52 3
a54 1
    static IA_BasePSIter<P> * make_iter(const IA_Set<P>&);
a83 3

#include "IntPoint.h"
typedef IA_PSIter<IA_IntPoint> IA_IPSIter;
@


1.9
log
@Copyright Notices
@
text
@d11 3
d40 1
d42 1
d44 19
a62 18
class IA_IPSIter {
protected:
  IA_BaseIPSIter	*iter;

  static IA_BaseIPSIter * make_iter(const IA_IntPointSet&);
public:
  IA_IPSIter() { iter = make_iter(IA_BlackHole(0)); }
  IA_IPSIter(const IA_IntPointSet &ips) { this->iter = make_iter(ips); }
  IA_IPSIter(const IA_IPSIter &x) { this->iter = x.iter->clone_self(); }
  ~IA_IPSIter() { delete iter; }

  IA_IPSIter& operator=(const IA_IntPointSet &);
  IA_IPSIter& operator=(const IA_IPSIter &);

  IA_IntPointSet domain() const { return iter->domain_(); }

  int operator() (IA_IntPoint& ip) { return iter->next(ip); }
  void reset() { iter->reset(); }
d71 1
a71 1
   IA_IPSIter	scan(blah);
d80 2
@


1.8
log
@Use IA_IntPoint instead of IntPoint
@
text
@d3 6
d11 3
@


1.7
log
@more IA_ prefixes.
more comments.
@
text
@d5 4
d46 1
a46 1
  int operator() (IntPoint& ip) { return iter->next(ip); }
d57 1
a57 1
   IntPoint	i;
@


1.6
log
@conversion to IA_ mostly complete
@
text
@d5 3
d32 1
a32 1
  IA_IPSIter() { iter = make_iter(BlackHole(0)); }
@


1.5
log
@the domain method is now const (like it should be)
@
text
@d5 3
d23 1
a23 1
class IPSIter {
d25 1
a25 1
  BaseIPSIter	*iter;
d27 1
a27 1
  static BaseIPSIter * make_iter(const IntPointSet&);
d29 4
a32 4
  IPSIter() { iter = make_iter(BlackHole(0)); }
  IPSIter(const IntPointSet &ips) { this->iter = make_iter(ips); }
  IPSIter(const IPSIter &x) { this->iter = x.iter->clone_self(); }
  ~IPSIter() { delete iter; }
d34 2
a35 2
  IPSIter& operator=(const IntPointSet &);
  IPSIter& operator=(const IPSIter &);
d37 1
a37 1
  IntPointSet domain() const { return iter->domain_(); }
d49 1
a49 1
   IPSIter	scan(blah);
@


1.4
log
@CFrontified version
@
text
@d5 2
d8 1
d34 1
a34 1
  IntPointSet domain() { return iter->domain_(); }
@


1.3
log
@Iterators no longer use multiple inheritance.  They now use
IntPointSets (and the hashing that implies).
@
text
@a4 2
// Revision 1.2  92/07/21  11:25:50  thoth
// new reset method.
a5 4
// Revision 1.1  92/07/16  11:51:25  thoth
// Initial revision
// 
// 
d10 1
d12 1
@


1.2
log
@new reset method.
@
text
@d5 3
d22 1
a22 1
private:
d24 2
d27 3
a29 1
  IPSIter(const IntPointSet&);
d31 6
@


1.1
log
@Initial revision
@
text
@d4 3
a6 1
// $Log$
d8 1
d25 1
@
