home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) IBM Corp. 1992 */
-
- #ifndef _IASRTREL_H
- #define _IASRTREL_H
-
- #include <iglobals.h>
- #include <icursor.h>
- #include <iaeqksrt.h>
-
- template < class Element, class Key >
- class IASortedRelation :
- public virtual IAEqualityKeySortedCollection < Element, Key > {
- public:
-
- virtual Boolean operator == (IASortedRelation < Element, Key > const&) const;
-
- virtual Boolean operator != (IASortedRelation < Element, Key > const&) const;
-
- virtual void unionWith (IASortedRelation < Element, Key > const&);
-
- virtual void intersectionWith (IASortedRelation < Element, Key > const&);
-
- virtual void differenceWith (IASortedRelation < Element, Key > const&);
-
- virtual void addUnion (IASortedRelation < Element, Key > const&,
- IASortedRelation < Element, Key > const&);
-
- virtual void addIntersection (IASortedRelation < Element, Key > const&,
- IASortedRelation < Element, Key > const&);
-
- virtual void addDifference (IASortedRelation < Element, Key > const&,
- IASortedRelation < Element, Key > const&);
-
- virtual long compare (IASortedRelation < Element, Key > const&,
- long (*comparisonFunction)
- (Element const&,
- Element const&)) const;
-
- protected:
-
- INumber numberOfOccurrences (Element const&) const;
-
- Boolean locateNext (Element const&, ICursor&)
- const;
-
- INumber removeAllOccurrences (Element const&);
-
- };
-
- #ifdef __IBMCPP__
- #include <iasrtrel.c>
- #endif
-
- #endif