head     1.4;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @// @;


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

1.3
date     93.01.19.14.56.11;  author jnw;  state Exp;
branches ;
next     1.2;

1.2
date     92.11.14.09.37.29;  author jnw;  state Exp;
branches ;
next     1.1;

1.1
date     92.10.05.11.44.32;  author jnw;  state Exp;
branches ;
next     ;


desc
@Initial revision
@


1.4
log
@static dummy member belongs in the .c file.
@
text
@// Emacs: -*- C++ -*-

// $Log:	FunctionDI.h,v $
// Revision 1.3  93/01/19  14:56:11  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/14  09:37:29  jnw
// Modified to support new iterator classes
// 
// Revision 1.1  92/10/05  11:44:32  jnw
// Initial revision
// 

#ifndef FunctionDI_h_
#define FunctionDI_h_

#include <stream.h>
#include "IntPoint.h"
#include "IntPointSet.h"
#include "BaseDI.h"

template <class T> class IA_FunctionDIVIter;

template <class T> class IA_FunctionDIPIter;

template <class T>
class IA_FunctionDI: public IA_BaseDI<T>{
private:
    T (*func)(IA_IntPoint);

    static char dummy;
public:
    IA_FunctionDI(T (*fp)(IA_IntPoint), const IA_IntPointSet& p): IA_BaseDI<T>(p){
	this->func = fp;
    }

    int extensivep() const { return 0; }

    T operator ()(const IA_IntPoint&) const;

    static IA_DiscreteImageType s_type() { return &dummy; }
    IA_DiscreteImageType type() const { return &dummy; }

    int equal(const IA_BaseDI<T>* other) const;

    IA_BaseDI<T>* clone_self_extensively() const;

    ostream& print_this(ostream&) const;

    friend class IA_FunctionDIVIter<T>;
    friend class IA_FunctionDIPIter<T>;
};

#endif
@


1.3
log
@Modified to support IA_ naming convention
@
text
@d4 3
d22 1
a22 2
template <class T>
class IA_FunctionDIVIter;
d24 1
a24 2
template <class T>
class IA_FunctionDIPIter;
a52 3

template <class T>
char IA_FunctionDI<T>::dummy = 0;
@


1.2
log
@Modified to support new iterator classes
@
text
@d4 3
d20 1
a20 1
class FunctionDIVIter;
d23 1
a23 1
class FunctionDIPIter;
d26 1
a26 1
class FunctionDI: public BaseDI<T>{
d28 1
a28 1
    T (*func)(IntPoint);
d32 1
a32 1
    FunctionDI(T (*fp)(IntPoint), const IntPointSet& p): BaseDI<T>(p){
d38 1
a38 1
    T operator ()(const IntPoint&) const;
d40 2
a41 2
    static DiscreteImageType s_type() { return &dummy; }
    DiscreteImageType type() const { return &dummy; }
d43 1
a43 1
    int equal(const BaseDI<T>* other) const;
d45 1
a45 1
    BaseDI<T>* clone_self_extensively() const;
d49 2
a50 2
    friend class FunctionDIVIter<T>;
    friend class FunctionDIPIter<T>;
d54 1
a54 1
char FunctionDI<T>::dummy = 0;
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
d17 1
a17 1
class FunctionDIIter;
d20 3
d46 2
a47 1
    friend class FunctionDIIter<T>;
@
