home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IABAG.H < prev    next >
Text File  |  1993-09-22  |  3KB  |  64 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 _IABAG_H
  13. #define _IABAG_H
  14.  
  15. #include <iglobals.h>
  16. #include <icursor.h>
  17. #include <iaequal.h>
  18.  
  19. template < class Element >
  20. class IABag : public virtual IAEqualityCollection < Element > {
  21. public:
  22.  
  23.   virtual INumber        numberOfOccurrences         (Element const&) const = 0;
  24.  
  25.   virtual IBoolean       locateNext                  (Element const&, ICursor&)
  26.                                                const = 0;
  27.  
  28.   virtual INumber        removeAllOccurrences        (Element const&) = 0;
  29.  
  30.   virtual INumber        numberOfDifferentElements   () const = 0;
  31.  
  32.   virtual IBoolean       setToNextDifferentElement   (ICursor&) const = 0;
  33.  
  34.   virtual IBoolean       operator ==                 (IABag < Element > const&) const;
  35.  
  36.   virtual IBoolean       operator !=                 (IABag < Element > const&) const;
  37.  
  38.   virtual void           unionWith                   (IABag < Element > const&) = 0;
  39.  
  40.   virtual void           intersectionWith            (IABag < Element > const&) = 0;
  41.  
  42.   virtual void           differenceWith              (IABag < Element > const&) = 0;
  43.  
  44.   virtual void           addUnion                    (IABag < Element > const&,
  45.                                                IABag < Element > const&) = 0;
  46.  
  47.   virtual void           addIntersection             (IABag < Element > const&,
  48.                                                IABag < Element > const&) = 0;
  49.  
  50.   virtual void           addDifference               (IABag < Element > const&,
  51.                                                IABag < Element > const&) = 0;
  52.  
  53. protected:
  54.  
  55. };
  56.  
  57. #ifdef __IBMCPP__
  58. #ifndef __TEMPINC__
  59. #include <iabag.c>
  60. #endif
  61. #endif
  62.  
  63. #endif
  64.