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


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

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

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

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

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


desc
@Initial revision
@


1.5
log
@The assignment operator is difficult to define
when you use multiple inheritance.
@
text
@// Emacs: -*- C++ -*-

// $Log:	BitwiseDI.m4h,v $
// Revision 1.4  93/02/08  11:33:02  thoth
// bitwiseDI assignment code may be wrong. commented out
// 
// Revision 1.3  93/01/19  14:55:42  jnw
// Modified to support IA_ naming convention
// 
// Revision 1.2  92/11/13  13:53:22  jnw
// Extensively modified
// 
// Revision 1.1  92/10/05  11:49:54  jnw
// Initial revision
// 

#ifndef BitwiseDIImage_h_
#define BitwiseDIImage_h_

#include "DiscreteImage.h"

#include "IntPointSet.h"
#include "LazyDI.h"
#include "VectorDI.h"
#include "DiscreteImage.h"

LAZY_BINARY(Mod)
LAZY_BINARY(Lshift)
LAZY_BINARY(Rshift)
LAZY_BINARY(And)
LAZY_BINARY(Xor)
LAZY_BINARY(Or)
LAZY_UNARY(UnaryNot)

template <class T>
class IA_BitwiseDI: public virtual IA_DiscreteImage<T> {

public:
    IA_BitwiseDI():IA_DiscreteImage<T>() { };

    IA_BitwiseDI(IA_BaseDI<T>* base)
    : IA_DiscreteImage<T>(base) { }

    IA_BitwiseDI(const IA_DiscreteImage<T>& di)
    : IA_DiscreteImage<T>(di) { }

    IA_BitwiseDI(const IA_BitwiseDI& bdi)
    : IA_DiscreteImage<T>( (IA_DiscreteImage<T>)bdi) { }
    

    IA_DiscreteImage<T>&   operator %=  (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T>&   operator <<= (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T>&   operator >>= (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T>&   operator &=  (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T>&   operator ^=  (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T>&   operator |=  (const IA_DiscreteImage<T>&);

    IA_DiscreteImage<T>&   operator %=  (const unsigned);
    IA_DiscreteImage<T>&   operator <<= (const unsigned);
    IA_DiscreteImage<T>&   operator >>= (const unsigned);
    IA_DiscreteImage<T>&   operator &=  (const unsigned);
    IA_DiscreteImage<T>&   operator ^=  (const unsigned);
    IA_DiscreteImage<T>&   operator |=  (const unsigned);

    IA_DiscreteImage<T> operator % (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T> operator <<(const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T> operator >>(const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T> operator & (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T> operator ^ (const IA_DiscreteImage<T>&);
    IA_DiscreteImage<T> operator | (const IA_DiscreteImage<T>&);
    
//    IA_DiscreteImage<T> operator % (const T&, const IA_DiscreteImage<T>&);
//    IA_DiscreteImage<T> operator <<(const T&, const IA_DiscreteImage<T>&);
//    IA_DiscreteImage<T> operator >>(const T&, const IA_DiscreteImage<T>&);
//    IA_DiscreteImage<T> operator & (const T&, const IA_DiscreteImage<T>&);
//    IA_DiscreteImage<T> operator ^ (const T&, const IA_DiscreteImage<T>&);
//    IA_DiscreteImage<T> operator | (const T&, const IA_DiscreteImage<T>&);
    
//    IA_DiscreteImage<T> operator % (const IA_DiscreteImage<T>&, const T&);
//    IA_DiscreteImage<T> operator <<(const IA_DiscreteImage<T>&, const T&);
//    IA_DiscreteImage<T> operator >>(const IA_DiscreteImage<T>&, const T&);
//    IA_DiscreteImage<T> operator & (const IA_DiscreteImage<T>&, const T&);
//    IA_DiscreteImage<T> operator ^ (const IA_DiscreteImage<T>&, const T&);
//    IA_DiscreteImage<T> operator | (const IA_DiscreteImage<T>&, const T&);
    

    IA_DiscreteImage<T>    operator ~  () const;

};

#endif

@


1.4
log
@bitwiseDI assignment code may be wrong. commented out
@
text
@d4 3
a36 8

protected:
#if 0
    IA_BitwiseDI& operator =(const IA_BitwiseDI &b) {
	this->bdip = b.bdip;
	return *this;
    }
#endif
@


1.3
log
@Modified to support IA_ naming convention
@
text
@d4 3
d36 1
d41 1
@


1.2
log
@Extensively modified
@
text
@d4 3
d30 1
a30 1
class BitwiseDI: public virtual DiscreteImage<T> {
d33 1
a33 1
    BitwiseDI& operator =(const BitwiseDI &b) {
d39 1
a39 1
    BitwiseDI():DiscreteImage<T>() { };
d41 2
a42 2
    BitwiseDI(BaseDI<T>* base)
    : DiscreteImage<T>(base) { }
d44 2
a45 2
    BitwiseDI(const DiscreteImage<T>& di)
    : DiscreteImage<T>(di) { }
d47 2
a48 2
    BitwiseDI(const BitwiseDI& bdi)
    : DiscreteImage<T>( (DiscreteImage<T>)bdi) { }
d51 6
a56 6
    DiscreteImage<T>&   operator %=  (const DiscreteImage<T>&);
    DiscreteImage<T>&   operator <<= (const DiscreteImage<T>&);
    DiscreteImage<T>&   operator >>= (const DiscreteImage<T>&);
    DiscreteImage<T>&   operator &=  (const DiscreteImage<T>&);
    DiscreteImage<T>&   operator ^=  (const DiscreteImage<T>&);
    DiscreteImage<T>&   operator |=  (const DiscreteImage<T>&);
d58 6
a63 6
    DiscreteImage<T>&   operator %=  (const unsigned);
    DiscreteImage<T>&   operator <<= (const unsigned);
    DiscreteImage<T>&   operator >>= (const unsigned);
    DiscreteImage<T>&   operator &=  (const unsigned);
    DiscreteImage<T>&   operator ^=  (const unsigned);
    DiscreteImage<T>&   operator |=  (const unsigned);
d65 6
a70 6
    DiscreteImage<T> operator % (const DiscreteImage<T>&);
    DiscreteImage<T> operator <<(const DiscreteImage<T>&);
    DiscreteImage<T> operator >>(const DiscreteImage<T>&);
    DiscreteImage<T> operator & (const DiscreteImage<T>&);
    DiscreteImage<T> operator ^ (const DiscreteImage<T>&);
    DiscreteImage<T> operator | (const DiscreteImage<T>&);
d72 6
a77 6
//    DiscreteImage<T> operator % (const T&, const DiscreteImage<T>&);
//    DiscreteImage<T> operator <<(const T&, const DiscreteImage<T>&);
//    DiscreteImage<T> operator >>(const T&, const DiscreteImage<T>&);
//    DiscreteImage<T> operator & (const T&, const DiscreteImage<T>&);
//    DiscreteImage<T> operator ^ (const T&, const DiscreteImage<T>&);
//    DiscreteImage<T> operator | (const T&, const DiscreteImage<T>&);
d79 6
a84 6
//    DiscreteImage<T> operator % (const DiscreteImage<T>&, const T&);
//    DiscreteImage<T> operator <<(const DiscreteImage<T>&, const T&);
//    DiscreteImage<T> operator >>(const DiscreteImage<T>&, const T&);
//    DiscreteImage<T> operator & (const DiscreteImage<T>&, const T&);
//    DiscreteImage<T> operator ^ (const DiscreteImage<T>&, const T&);
//    DiscreteImage<T> operator | (const DiscreteImage<T>&, const T&);
d87 1
a87 1
    DiscreteImage<T>    operator ~  () const;
@


1.1
log
@Initial revision
@
text
@d3 4
a6 1
// $Log$
a29 2
    BitwiseDI():DiscreteImage<T>() { };

d36 1
a36 1
    BitwiseDI    operator ~  () const;
d38 2
a39 6
    const  BitwiseDI&   operator %=  (const BitwiseDI&);
    const  BitwiseDI&   operator <<= (const BitwiseDI&);
    const  BitwiseDI&   operator >>= (const BitwiseDI&);
    const  BitwiseDI&   operator &=  (const BitwiseDI&);
    const  BitwiseDI&   operator ^=  (const BitwiseDI&);
    const  BitwiseDI&   operator |=  (const BitwiseDI&);
d41 2
a42 6
    const  BitwiseDI&   operator %=  (const unsigned);
    const  BitwiseDI&   operator <<= (const unsigned);
    const  BitwiseDI&   operator >>= (const unsigned);
    const  BitwiseDI&   operator &=  (const unsigned);
    const  BitwiseDI&   operator ^=  (const unsigned);
    const  BitwiseDI&   operator |=  (const unsigned);
d44 2
a45 6
    friend BitwiseDI<T> operator % (const BitwiseDI<T>&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator <<(const BitwiseDI<T>&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator >>(const BitwiseDI<T>&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator & (const BitwiseDI<T>&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator ^ (const BitwiseDI<T>&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator | (const BitwiseDI<T>&, const BitwiseDI<T>&);
d47 21
a67 6
    friend BitwiseDI<T> operator % (const T&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator <<(const T&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator >>(const T&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator & (const T&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator ^ (const T&, const BitwiseDI<T>&);
    friend BitwiseDI<T> operator | (const T&, const BitwiseDI<T>&);
d69 6
a74 6
    friend BitwiseDI<T> operator % (const BitwiseDI<T>&, const T&);
    friend BitwiseDI<T> operator <<(const BitwiseDI<T>&, const T&);
    friend BitwiseDI<T> operator >>(const BitwiseDI<T>&, const T&);
    friend BitwiseDI<T> operator & (const BitwiseDI<T>&, const T&);
    friend BitwiseDI<T> operator ^ (const BitwiseDI<T>&, const T&);
    friend BitwiseDI<T> operator | (const BitwiseDI<T>&, const T&);
d76 10
@
