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

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