head	1.6;
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.2
	r0_9:1.2;
locks; strict;
comment	@// @;


1.6
date	94.12.22.16.30.25;	author fjsoria;	state Exp;
branches;
next	1.5;

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

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

1.3
date	94.02.12.19.34.43;	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.55.38;	author thoth;	state Exp;
branches;
next	;


desc
@User-defined template derivation point.
@


1.6
log
@stic data member templates fixed for g++
@
text
@// Emacs: -*- C++ -*-

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


//
// $Log: ClosureDT.h,v $
// Revision 1.5  1994/07/25  17:26:39  thoth
// Name sanitization
//
// Revision 1.4  1994/02/22  18:46:25  thoth
// New is_a virtual method, used to determine if an object is of a
// class derived from another class.
//
// Revision 1.3  1994/02/12  19:34:43  thoth
// Using IA::Type instead of the IA_DiscreteImageType typedef.
//
// Revision 1.2  1993/10/05  19:33:08  thoth
// Move to new Closure naming convention.
//
// Revision 1.1  1993/09/15  12:55:38  thoth
// Initial revision
//
// Revision 1.3  93/05/27  11:22:39  thoth
// Copyright Notices
// 
// Revision 1.2  93/04/08  13:20:42  thoth
// Templates are now separate from images.
// 
// Revision 1.1  93/03/18  11:07:37  thoth
// Initial revision
// 

#ifndef ClosureDT_h_
#define ClosureDT_h_

#include "BaseDT.h"

template <class I>
class IA_ClosureDT: public IA_BaseDT<I> {
  private:
    static char	dummy;
  public:
    IA_ClosureDT(const IA_Set<IA_Point<int> > &ps)
    :IA_BaseDT<I>(ps) { }

    virtual IA_ClosureDT<I> *clone_self() const =0;

    static IA::Type s_type() { return &dummy; }
    IA::Type type() const { return &dummy; }
    int is_a(IA::Type t) { return t == s_type() ; }

    ostream &print_this(ostream &o) const { return o<<"User-defined template\n"; }

    // the user must provide
    // I operator()(const IA_Point<int> &p) const
    // IA_ClosureDT<I> *clone_self() const;
};

// should go in ClosureDT.c

#ifndef IA_NO_AUTOINST_OF_STATIC_DATA
template <class I>
char IA_ClosureDT<I>::dummy;
#else
char IA_ClosureDT<IA_Image<IA_Point<int>, int> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<int>, float> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<int>, u_char> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<int>, IA_RGB> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<int>, IA_Bit> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<int>, complex> >::dummy;
char IA_ClosureDT<IA_Image<IA_Point<double>, float> >::dummy;
#endif

#endif
@


1.5
log
@Name sanitization
@
text
@d11 3
d64 2
d68 9
@


1.4
log
@New is_a virtual method, used to determine if an object is of a
class derived from another class.
@
text
@d11 4
d44 1
a44 1
    IA_ClosureDT(const IA_IntPointSet &ps)
d56 1
a56 1
    // I operator()(const IA_IntPoint &p) const
@


1.3
log
@Using IA::Type instead of the IA_DiscreteImageType typedef.
@
text
@d11 3
d47 1
@


1.2
log
@Move to new Closure naming convention.
@
text
@d11 3
d42 2
a43 2
    static IA_DiscreteImageType s_type() { return &dummy; }
    IA_DiscreteImageType type() const { return &dummy; }
@


1.1
log
@Initial revision
@
text
@d10 4
a13 1
// $Log:	OtherDT.h,v $
d24 2
a25 2
#ifndef OtherDT_h_
#define OtherDT_h_
d30 1
a30 1
class IA_OtherDT: public IA_BaseDT<I> {
d34 1
a34 1
    IA_OtherDT(const IA_IntPointSet &ps)
d37 1
a37 1
    virtual IA_OtherDT<I> *clone_self() const =0;
d46 1
a46 1
    // IA_OtherDT<I> *clone_self() const;
d49 1
a49 1
// should go in OtherDT.c
d51 1
a51 1
char IA_OtherDT<I>::dummy;
@
