head	1.2;
access;
symbols
	bobbase:1.2
	bob:1.2
	r2_1:1.2
	C_8:1.2
	r2_0:1.2
	r1_1_beta:1.2
	r1_1_alpha:1.2
	r1_0:1.2
	r0_11:1.2
	r0_10:1.2
	r0_9:1.2;
locks
	fjsoria:1.2; strict;
comment	@// @;


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

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


desc
@Base image iterator implementation.
@


1.2
log
@Some guards to make the base class handle the error iterators.
@
text
@// Emacs: -*- C++ -*-

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


//
// $Log:	BaseImageIter.c,v $
// Revision 1.1  93/09/15  12:50:31  thoth
// Initial revision
// 

#include "BaseImageIter.h"
#include "BaseI.h"

template < class P,class T>
IA_BaseIVIter<P,T>::IA_BaseIVIter(const IA_BaseImage<P,T> *x)
{
    // cast away const
    domain = (IA_BaseImage<P,T>*)x;
    if (domain)			// ErrorIters pass 0
	domain->incr_ref();
}

template < class P,class T>
IA_BaseIVIter<P,T>::~IA_BaseIVIter()
{
    if (domain			// ErrorIters pass 0
	&& domain->decr_ref()<=0)
	    delete domain;
    domain = 0;
}

//
//
//

template < class P,class T>
IA_BaseIPIter<P,T>::IA_BaseIPIter(const IA_BaseImage<P,T> *x)
{
    // cast away const
    domain = (IA_BaseImage<P,T>*)x;
    if (domain)
	domain->incr_ref();
}

template < class P,class T>
IA_BaseIPIter<P,T>::~IA_BaseIPIter()
{
    if (domain
	&& domain->decr_ref()<=0)
	delete domain;
    domain = 0;
}
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log:	BaseDIIter.c,v $
d45 2
a46 1
    domain->incr_ref();
d52 2
a53 1
    if (domain->decr_ref()<=0)
d55 1
@
