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


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

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

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

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

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

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

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

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

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

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


desc
@header file for the Boxy IntPointSet iterator
@


1.10
log
@\Name sanitization
@
text
@// Emacs: -*- C++ -*-

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

// 
// $Log: BoxyIPSIter.h,v $
// Revision 1.9  1994/03/30  13:47:16  thoth
// Renamed files to BasePSIter.
//
// Revision 1.8  1993/07/15  11:39:38  thoth
// new BasePSIter implementation.
//
// Revision 1.7  93/05/26  16:41:07  thoth
// Copyright Notices.
// 
// Revision 1.6  92/12/16  14:48:01  thoth
// conversion to IA_ mostly complete
// 
// Revision 1.5  92/08/23  13:30:02  thoth
// CFrontified version
// 
// 

#ifndef BoxyIPSIter_h_
#define BoxyIPSIter_h_

#ifdef IA_PRII
#pragma interface
#endif

#include "BasePSIter.h"
#include "BoxyIPS.h"

/*
   Iterator for the BoxyPointSet class.
 */

class IA_BoxyIPSIter: public IA_BasePSIter<IA_Point<int> > {
    // This data member stores the current position of the iterator.
    // It is set to the minimum point in the BoxyIPS upon construction
    // and upon invocation of the reset() method.
    IA_Point<int> curr;
    // invariant:
    // While the iterator is still scanning the
    // point set: BoxyIPS.contains(curr).

    IA_BoxyIPS *box() const { return (IA_BoxyIPS*)domain; }

public:
    IA_BoxyIPSIter(IA_BoxyIPS *);
    IA_BoxyIPSIter(const IA_BoxyIPSIter &);
    ~IA_BoxyIPSIter() { }

    IA_BasePSIter<IA_Point<int> > *clone_self() { return new IA_BoxyIPSIter(*this); }
    int next(IA_Point<int>&);
    void reset() { this->curr = box()->start; }
};

#endif
@


1.9
log
@Renamed files to BasePSIter.
@
text
@d10 3
d41 1
a41 1
class IA_BoxyIPSIter: public IA_BaseIPSIter {
d45 1
a45 1
    IA_IntPoint curr;
d57 2
a58 2
    IA_BaseIPSIter *clone_self() { return new IA_BoxyIPSIter(*this); }
    int next(IA_IntPoint&);
@


1.8
log
@new BasePSIter implementation.
@
text
@d9 4
a12 1
// $Log:	BoxyIPSIter.h,v $
d31 1
a31 1
#include "BaseIPSIter.h"
@


1.7
log
@Copyright Notices.
@
text
@d10 3
d44 1
a44 4
    // This is set to the ps data member of the IntPointSet we're
    // iterating over.  It's sort of a cache that prevents this class
    // from needing to know about the guts of an IntPointSet.
    IA_BoxyIPS	*box;
d47 1
a47 1
    IA_BoxyIPSIter(const IA_IntPointSet&, IA_BoxyIPS *);
d53 1
a53 1
    void reset() { this->curr = box->start; }
@


1.6
log
@conversion to IA_ mostly complete
@
text
@d3 5
d10 3
@


1.5
log
@CFrontified version
@
text
@d5 2
d8 1
d24 1
a24 1
class BoxyIPSIter: public BaseIPSIter {
d28 1
a28 1
    IntPoint curr;
d36 1
a36 1
    BoxyIPS	*box;
d39 3
a41 3
    BoxyIPSIter(const IntPointSet&, BoxyIPS *);
    BoxyIPSIter(const BoxyIPSIter &);
    ~BoxyIPSIter() { }
d43 2
a44 2
    BaseIPSIter *clone_self() { return new BoxyIPSIter(*this); }
    int next(IntPoint&);
@


1.4
log
@Iterators no longer use multiple inheritance.  They now use
IntPointSets (and the hashing that implies).
@
text
@a4 2
// Revision 1.3  92/07/26  16:27:32  thoth
// Added some comments so people might be able to understand the code.
a5 7
// Revision 1.2  92/07/21  11:20:48  thoth
// used a Point for the current index
// 
// Revision 1.1  92/07/16  11:50:52  thoth
// Initial revision
// 
// 
d10 1
d12 1
@


1.3
log
@Added some comments so people might be able to understand the code.
@
text
@d5 3
d26 1
d28 1
a28 10
 This iterator uses multiple inheritance so that it can absorb the
data of the set it is iterating over.  This means that the point set
the iterator is constructed from can be modified without affecting the
operation of the iterator.  It has its own copy of all the information
it needs.  This can be a feature or a flaw depending on how you look
at it.  Either way, it's documented so don't whine.

*/

class BoxyIPSIter: public BaseIPSIter, public BoxyIPS {
d34 1
a34 1
    // while the iterator is still scanning the
d36 6
d43 2
a44 1
    BoxyIPSIter(const BoxyIPS&);
d47 1
d49 1
a49 1
    void reset() { this->curr = this->min(); }
@


1.2
log
@used a Point for the current index
@
text
@d5 3
d21 12
d34 3
d38 3
@


1.1
log
@Initial revision
@
text
@d4 3
a6 1
// $Log$
d8 1
d19 1
a19 1
    int	*curr;
d22 1
a22 1
    ~BoxyIPSIter() { delete[] curr; }
d25 1
@
