home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / bbxxj / iasrtrel.h__ / IASRTREL.H
Encoding:
C/C++ Source or Header  |  1992-10-26  |  2.0 KB  |  55 lines

  1. /* Copyright (c) IBM Corp. 1992 */
  2.  
  3. #ifndef _IASRTREL_H
  4. #define _IASRTREL_H
  5.  
  6. #include <iglobals.h>
  7. #include <icursor.h>
  8. #include <iaeqksrt.h>
  9.  
  10. template < class Element, class Key >
  11. class IASortedRelation :
  12.   public virtual IAEqualityKeySortedCollection < Element, Key > {
  13. public:
  14.  
  15.   virtual Boolean        operator ==                 (IASortedRelation < Element, Key > const&) const;
  16.  
  17.   virtual Boolean        operator !=                 (IASortedRelation < Element, Key > const&) const;
  18.  
  19.   virtual void           unionWith                   (IASortedRelation < Element, Key > const&);
  20.  
  21.   virtual void           intersectionWith            (IASortedRelation < Element, Key > const&);
  22.  
  23.   virtual void           differenceWith              (IASortedRelation < Element, Key > const&);
  24.  
  25.   virtual void           addUnion                    (IASortedRelation < Element, Key > const&,
  26.                                                IASortedRelation < Element, Key > const&);
  27.  
  28.   virtual void           addIntersection             (IASortedRelation < Element, Key > const&,
  29.                                                IASortedRelation < Element, Key > const&);
  30.  
  31.   virtual void           addDifference               (IASortedRelation < Element, Key > const&,
  32.                                                IASortedRelation < Element, Key > const&);
  33.  
  34.   virtual long           compare                     (IASortedRelation < Element, Key > const&,
  35.                                                long (*comparisonFunction)
  36.                                                   (Element const&,
  37.                                                   Element const&)) const;
  38.  
  39. protected:
  40.  
  41.    INumber        numberOfOccurrences         (Element const&) const;
  42.  
  43.    Boolean        locateNext                  (Element const&, ICursor&)
  44.                                                const;
  45.  
  46.    INumber        removeAllOccurrences        (Element const&);
  47.  
  48. };
  49.  
  50. #ifdef __IBMCPP__
  51. #include <iasrtrel.c>
  52. #endif
  53.  
  54. #endif
  55.