home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / runnable / ibmc / ibmclass / iaset.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-26  |  1.6 KB  |  53 lines

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