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