head	1.5;
access;
symbols
	bobbase:1.4
	bob:1.4.1
	r2_1:1.2
	r2_0:1.2
	r1_1_beta:1.2
	r1_1_alpha:1.2
	r1_0:1.2
	r0_11:1.2;
locks
	fjsoria:1.5; strict;
comment	@// @;


1.5
date	94.11.10.18.48.45;	author fjsoria;	state Exp;
branches;
next	1.4;

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

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

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

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

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


desc
@Abstract class defining the interface for a Set implementation.
@


1.5
log
@*** empty log message ***
@
text
@// Emacs -*- C++ -*-

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

//
// $Log: BaseSet.h,v $
// Revision 1.4  1994/10/03  17:29:30  thoth
// Added support for iterators.
//
// Revision 1.3  1994/09/20  17:31:34  thoth
// Certain functions have the same answer for most derived classes so
// we might as well define them at the root.
//
// Revision 1.2  1994/04/26  18:08:17  thoth
// refcount wasn't being initialized.  Disastrous.
//
// Revision 1.1  1994/03/21  23:07:27  thoth
// Initial revision
//

#ifndef IA_BaseSet_h_
#define IA_BaseSet_h_

#include "ia.h"
#include "BSetIter.h"

template <class T>
class IA_BaseSet {
    int	refcount;
public:
    IA_BaseSet() { refcount=0; }
    virtual ~IA_BaseSet() {}

    virtual IA::Type type() const=0;

    int incr_ref() { return refcount++; }
    int decr_ref() { return --refcount; }

    virtual unsigned card() const;

    virtual int contains (T) const = 0;

    virtual T min() const;
    virtual T max() const;
    virtual T choice() const;
    virtual int empty() const;

    virtual IA_BaseSetIter<T> *iterator() const;
};

#endif // IA_BaseSet_h_
@


1.4
log
@Added support for iterators.
@
text
@d10 3
d28 1
a28 3

template <class T>
class IA_BaseSetIter;
@


1.4.1.1
log
@New extensive() method.
@
text
@a9 3
// Revision 1.4  1994/10/03  17:29:30  thoth
// Added support for iterators.
//
a39 4

    // if extensive() returns 1 then card(), min(), max(), empty() and
    // iterator() are guaranteed to work
    virtual int extensive() const;
@


1.3
log
@Certain functions have the same answer for most derived classes so
we might as well define them at the root.
@
text
@d10 4
d27 3
d50 1
@


1.2
log
@refcount wasn't being initialized.  Disastrous.
@
text
@d10 3
d34 1
a34 1
    virtual unsigned card() const =0;
d38 4
a41 4
    virtual T min() const = 0;
    virtual T max() const = 0;
    virtual T choice() const = 0;
    virtual int empty() const = 0;
@


1.1
log
@Initial revision
@
text
@d9 4
a12 1
// $Log$
d23 1
@
