home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) IBM Corp. 1992 */
-
- #ifndef _IASRTMAP_H
- #define _IASRTMAP_H
-
- #include <iglobals.h>
- #include <icursor.h>
- #include <iaeqksrt.h>
-
- template < class Element, class Key >
- class IASortedMap :
- public virtual IAEqualityKeySortedCollection < Element, Key > {
- public:
-
- virtual Boolean operator == (IASortedMap < Element, Key > const&) const;
-
- virtual Boolean operator != (IASortedMap < Element, Key > const&) const;
-
- virtual void unionWith (IASortedMap < Element, Key > const&);
-
- virtual void intersectionWith (IASortedMap < Element, Key > const&);
-
- virtual void differenceWith (IASortedMap < Element, Key > const&);
-
- virtual void addUnion (IASortedMap < Element, Key > const&,
- IASortedMap < Element, Key > const&);
-
- virtual void addIntersection (IASortedMap < Element, Key > const&,
- IASortedMap < Element, Key > const&);
-
- virtual void addDifference (IASortedMap < Element, Key > const&,
- IASortedMap < Element, Key > const&);
-
- virtual long compare (IASortedMap < 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&);
-
- INumber numberOfElementsWithKey (Key const&) const;
-
- Boolean locateNextElementWithKey (Key const&,
- ICursor&) const;
-
- INumber removeAllElementsWithKey (Key const&);
-
- INumber numberOfDifferentKeys () const;
-
- Boolean setToNextWithDifferentKey (ICursor&) const;
-
- };
-
- #ifdef __IBMCPP__
- #include <iasrtmap.c>
- #endif
-
- #endif