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


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

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

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

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

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


desc
@User-defined image derivation point.
@


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

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


//
// $Log: ClosureI.h,v $
// Revision 1.4  1994/03/14  15:48:33  thoth
// ValueSet has been replaced by container class Set.
//
// Revision 1.3  1993/11/17  18:12:47  thoth
// extensivep is now extensive
//
// Revision 1.2  1993/10/05  19:33:08  thoth
// Move to new Closure naming convention.
//
// Revision 1.1  1993/09/15  12:56:25  thoth
// Initial revision
//

#ifndef ClosureI_h_
#define ClosureI_h_

#include "BaseI.h"

// This class is designed for a user to derive from.

// The user must provide an operator() that maps a point
// from the image\'s domain onto the value at that point.
// The user must also provide a clone_self method which
// is needed by the container class.

template < class P,class T>
class IA_ClosureI: public IA_BaseImage<P,T> {
 public:
    static char dummy;
 public:
    IA_ClosureI(IA_Set<P> ps_) :IA_BaseImage<P,T>(ps_) {}

    // most user-defined images will be non-extensive
    int extensive() const { return 0; }

    static IA::Type s_type() { return &dummy; }

    IA::Type type() const { return &dummy; }

    ostream &print_this(ostream&) const;

    // Return a pointer to a copy of yourself on the heap.
    // If you do this wrong, images implemented using the
    // derived class will NOT work.
    virtual IA_ClosureI<P,T>* clone_self() const = 0;

    ////////////////////////////////////////////////////////////////
    // derived class MUST provide:
    // T operator()(const P&) const;
    // IA_ClosureI<P,T>* clone_self() const;

    // recommended:
    // ostream &print_this(ostream&) const;

    // perhaps (if you can do them faster...):
    // IA_Set<T> range() const;
    // IA_BaseImage<P,T>* clone_self_extensively() const;

    // and if you want to be extensive:
    // T &operator[](const P&);
    // int extensive() const { return 1; }
};

#endif
@


1.4
log
@ValueSet has been replaced by container class Set.
@
text
@d11 3
d46 1
a46 1
    static IA_ImageType s_type() { return &dummy; }
d48 1
a48 1
    IA_ImageType type() const { return &dummy; }
@


1.3
log
@extensivep is now extensive
@
text
@d11 3
d63 1
a63 1
    // IA_ValueSet<T> range() const;
@


1.2
log
@Move to new Closure naming convention.
@
text
@d11 3
d38 1
a38 1
    int extensivep() const { return 0; }
d65 1
a65 1
    // int extensivep() const { return 1; }
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log:	OtherI.h,v $
d15 2
a16 2
#ifndef OtherI_h_
#define OtherI_h_
d28 1
a28 1
class IA_OtherI: public IA_BaseImage<P,T> {
d32 1
a32 1
    IA_OtherI(IA_Set<P> ps_) :IA_BaseImage<P,T>(ps_) {}
d46 1
a46 1
    virtual IA_OtherI<P,T>* clone_self() const = 0;
d51 1
a51 1
    // IA_OtherI<P,T>* clone_self() const;
@
