head	1.4;
access;
symbols
	bobbase:1.4
	bob:1.4.1
	r2_1:1.4
	r2_0:1.4
	r1_1_beta:1.4
	r1_1_alpha:1.3
	r1_0:1.3
	r0_11:1.3
	r0_10:1.2
	r0_9:1.2;
locks
	thoth:1.4.1.1
	thoth:1.4; strict;
comment	@// @;


1.4
date	94.07.25.17.26.39;	author thoth;	state Exp;
branches
	1.4.1.1;
next	1.3;

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

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

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

1.4.1.1
date	94.12.28.16.56.06;	author thoth;	state Exp;
branches;
next	;


desc
@Erroneous image declaration.
@


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

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


//
// $Log: ErrorI.h,v $
// Revision 1.3  1994/03/14  15:48:33  thoth
// ValueSet has been replaced by container class Set.
//
// Revision 1.2  1993/11/17  18:14:21  thoth
// extensivep is now extensive.
// The empty ValueSet is not initialized by 0.
//
// Revision 1.1  1993/09/15  12:52:03  thoth
// Initial revision
//

#ifndef ErrorDI_h_
#define ErrorDI_h_

#include <stdlib.h>
#include "BaseI.h"

// ErrorI generates members of a class of BaseImages whose only valid operation
// is decr_ref().  This is used to trap operations occurring upon
// uninitialized images.

template < class P,class T>
class IA_ErrorI:public IA_BaseImage<P,T> {

public:

    IA_ErrorI() :IA_BaseImage<P,T>(IA_Set<P>()) { }

    int extensive() const { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return 0;
    }

    T operator ()(const P &) const { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return *(new T());
    }

    T& operator [](const P &) { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return *(new T());
    }

#if 0
    T& operator [](int) { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return *(new T());
    }

    T operator ()(int) const {
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return *(new T());
    }
#endif

    static IA::Type s_type() { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return 0;
    }

    IA::Type type() const { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return 0;
    }

    IA_Set<P> domain() const { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return this->ps;
    }

    IA_Set<T> range() const { 
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return IA_Set<T>();
    }

    // ~IA_ErrorI() { } // gratuitous

    IA_BaseImage<P,T>* clone_self_extensively() const {
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return (IA_BaseImage<P,T> *)this;
    }

    virtual ostream& print_this(ostream& o) const {
	ia_throw( IA::IMAGE_REQUIRE_VALUE, __FILE__,__LINE__);
	return o;
    }
    
};

#endif
@


1.4.1.1
log
@Conversion to classes for throw.
@
text
@a10 3
// Revision 1.4  1994/07/25  17:26:39  thoth
// Name sanitization
//
a26 1
#include "image_errors.h"
d40 1
a40 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d45 1
a45 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d50 1
a50 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d56 1
a56 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d61 1
a61 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d67 1
a67 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d72 1
a72 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d77 1
a77 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d82 1
a82 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d89 1
a89 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
d94 1
a94 1
	ia_throw(Image_Uninitialized_Exception(__FILE__, __LINE__));
@


1.3
log
@ValueSet has been replaced by container class Set.
@
text
@d11 3
d66 1
a66 1
    static IA_ImageType s_type() { 
d71 1
a71 1
    IA_ImageType type() const { 
@


1.2
log
@extensivep is now extensive.
The empty ValueSet is not initialized by 0.
@
text
@d11 4
d78 1
a78 1
    IA_ValueSet<T> range() const { 
d80 1
a80 1
	return IA_ValueSet<T>();
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log:	ErrorDI.h,v $
d32 1
a32 1
    int extensivep() const { 
d76 1
a76 1
	return 0;
@
