home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IASET.H < prev    next >
Text File  |  1993-09-22  |  2KB  |  60 lines

  1. /*******************************************************************************
  2. *                                                                              *
  3. * COPYRIGHT:                                                                   *
  4. *   IBM C/C++ Tools Version 2.01 - Collection Class Library                    *
  5. *   Licensed Materials - Property of IBM                                       *
  6. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  7. *   All Rights Reserved                                                        *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  10. *                                                                              *
  11. *******************************************************************************/
  12. #ifndef _IASET_H
  13. #define _IASET_H
  14.  
  15. #include <iglobals.h>
  16. #include <icursor.h>
  17. #include <iaequal.h>
  18.  
  19. template < class Element >
  20. class IASet : public virtual IAEqualityCollection < Element > {
  21. public:
  22.  
  23.   virtual IBoolean       operator ==                 (IASet < Element > const&) const;
  24.  
  25.   virtual IBoolean       operator !=                 (IASet < Element > const&) const;
  26.  
  27.   virtual void           unionWith                   (IASet < Element > const&) = 0;
  28.  
  29.   virtual void           intersectionWith            (IASet < Element > const&) = 0;
  30.  
  31.   virtual void           differenceWith              (IASet < Element > const&) = 0;
  32.  
  33.   virtual void           addUnion                    (IASet < Element > const&,
  34.                                                IASet < Element > const&) = 0;
  35.  
  36.   virtual void           addIntersection             (IASet < Element > const&,
  37.                                                IASet < Element > const&) = 0;
  38.  
  39.   virtual void           addDifference               (IASet < Element > const&,
  40.                                                IASet < Element > const&) = 0;
  41.  
  42. protected:
  43.  
  44.    INumber        numberOfOccurrences         (Element const&) const;
  45.  
  46.    IBoolean       locateNext                  (Element const&, ICursor&)
  47.                                                const;
  48.  
  49.    INumber        removeAllOccurrences        (Element const&);
  50.  
  51. };
  52.  
  53. #ifdef __IBMCPP__
  54. #ifndef __TEMPINC__
  55. #include <iaset.c>
  56. #endif
  57. #endif
  58.  
  59. #endif
  60.