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


1.14
date	94.12.01.15.57.01;	author fjsoria;	state Exp;
branches;
next	1.13;

1.13
date	94.11.30.19.24.20;	author fjsoria;	state Exp;
branches;
next	1.12;

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

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

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

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

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

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

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

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

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

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

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

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


desc
@header file for the base of the IntPointSet iterator data structures
@


1.14
log
@changed gaurd __NO_INLINE_DESTRUCTORS to
__NO_OUTLINE_DESTRUCTORS
@
text
@// Emacs: -*- C++ -*-

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

// 
// $Log: BasePSIter.h,v $
// Revision 1.13  1994/11/30  19:24:20  fjsoria
// using hash_managed_delete instead of delete_domain
// for the inline destructor call
//
// Revision 1.12  1994/07/25  16:58:52  thoth
// Name sanitization
//
// Revision 1.11  1994/03/30  13:47:16  thoth
// Renamed files to BasePSIter.
//
// Revision 1.10  1993/07/15  11:24:09  thoth
// Conversion to BasePSIter<P>.
// Uses IA_BasePS<P> * directly now with reference counting.
//
// Revision 1.9  93/05/26  16:40:53  thoth
// Copyright Notices.
// 
// Revision 1.8  93/04/17  14:52:59  thoth
// Use IA_IntPoint instead of IntPoint
// 
// Revision 1.7  93/02/12  16:21:14  thoth
// more comments
// 
// Revision 1.6  92/12/16  14:47:51  thoth
// conversion to IA_ mostly complete
// 
// Revision 1.5  92/08/23  13:29:50  thoth
// CFrontified version
// 
// 

#ifndef BasePSIter_h_
#define BasePSIter_h_

#include "BasePS.h"
#include "IntPS.h"

#ifdef IA_PRII
#pragma interface
#endif

template <class P>
class IA_BasePSIter {
  protected:
    // This is the point set we are iterating over.  Each derived class
    // will have a function to return this pointer casted to the
    // appropriate type derived from IA_BasePS

    IA_BasePS<P>	*domain;

public:
    // This constructor is required.  It sets the domain appropriately
    // so that derived classes don\'t have to worry about it.  It also
    // handles reference counting of the BasePS for compatibility with
    // the PointSet refcounting.
    IA_BasePSIter(IA_BasePS<P> *x);
    IA_BasePSIter(const IA_BasePSIter<P> & psi);
    // If an ojbect of a derived class is destructed through a base pointer
    // the correct destructor will be called.

#ifdef __NO_OUTLINE_DESTRUCTORS
   virtual ~IA_BasePSIter() {
      hash_managed_delete(domain);
   }  
#else
   virtual ~IA_BasePSIter();
#endif

  IA_BasePSIter<P>& operator=(const IA_BasePSIter<P> &arg);

    // This returns a pointer to a copy of the object allocated on the heap
    virtual IA_BasePSIter<P> * clone_self() =0;

    /*
      If the iterator has reached the end, the next() method will return 0.
      Otherwise it will set the reference parameter to the
      (lexicographically) next point in the point set and return 1.
      */
    virtual int next(P&) =0;

    /* this method resets the iterator to the beginning of the point set */
    virtual void reset() =0;

    IA_BasePS<P> *domain_() const { return this->domain; }
};

#include "IntPoint.h"


#endif // BasePSIter_h_
@


1.13
log
@using hash_managed_delete instead of delete_domain
for the inline destructor call
@
text
@d10 4
d70 1
a70 1
#ifdef __NO_INLINE_DESTRUCTORS
@


1.12
log
@\Name sanitization
@
text
@d10 3
d41 1
d65 8
a72 1
    virtual ~IA_BasePSIter();
d74 1
a74 1
    IA_BasePSIter<P>& operator=(const IA_BasePSIter<P> &arg);
@


1.11
log
@Renamed files to BasePSIter.
@
text
@d9 4
a12 1
// $Log: BaseIPSIter.h,v $
a82 1
typedef IA_BasePSIter<IA_IntPoint> IA_BaseIPSIter;
@


1.10
log
@Conversion to BasePSIter<P>.
Uses IA_BasePS<P> * directly now with reference counting.
@
text
@d9 5
a13 1
// $Log:	BaseIPSIter.h,v $
d31 2
a32 2
#ifndef BaseIPSIter_h_
#define BaseIPSIter_h_
d82 1
a82 1
#endif
@


1.9
log
@Copyright Notices.
@
text
@d10 3
d30 1
a30 2
#include "IntPoint.h"
#include "IntPointSet.h"
d36 3
a38 2
class IA_BaseIPSIter {
protected:
d40 2
a41 3
    // will also store the value of ips.ps in a variable to obviate the
    // need to know about the guts of IntPointSet.
    IA_IntPointSet	domain;
d43 2
d47 5
a51 2
    // so that derived classes don\'t have to worry about it.
    IA_BaseIPSIter(const IA_IntPointSet &x) :domain(x) {}
d54 1
a54 1
    virtual ~IA_BaseIPSIter() {}
d56 2
d59 1
a59 1
    virtual IA_BaseIPSIter * clone_self() =0;
d66 1
a66 1
    virtual int next(IA_IntPoint&) =0;
d71 1
a71 1
    IA_IntPointSet domain_() const { return this->domain; }
d73 4
@


1.8
log
@Use IA_IntPoint instead of IntPoint
@
text
@d3 5
d10 3
@


1.7
log
@more comments
@
text
@d5 3
d49 1
a49 1
    virtual int next(IntPoint&) =0;
@


1.6
log
@conversion to IA_ mostly complete
@
text
@d5 3
d31 2
d34 2
d38 1
a38 1
    // this returns a pointer to a copy of the object
@


1.5
log
@CFrontified version
@
text
@d5 2
d8 1
d20 1
a20 1
class BaseIPSIter {
d25 1
a25 1
    IntPointSet	domain;
d28 2
a29 2
    BaseIPSIter(const IntPointSet &x) :domain(x) {}
    virtual ~BaseIPSIter() {}
d32 1
a32 1
    virtual BaseIPSIter * clone_self() =0;
d44 1
a44 1
    IntPointSet domain_() const { return this->domain; }
@


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:28  thoth
// Added some comments so people might be able to understand the code.
a5 7
// Revision 1.2  92/07/21  11:17:24  thoth
// method to reset the iterator
// 
// Revision 1.1  92/07/16  11:49:40  thoth
// Initial revision
// 
// 
d12 4
@


1.3
log
@Added some comments so people might be able to understand the code.
@
text
@d5 3
d20 1
d23 6
d30 1
d33 3
d45 2
@


1.2
log
@method to reset the iterator
@
text
@d5 3
d21 6
d28 2
@


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