home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iasb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.1 KB  |  101 lines

  1. /**********************************************************************
  2. *                                                                     *
  3. *  IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3.5           *
  4. *                                                                     *
  5. *  PID: 5622-880                                                      *
  6. *  - Licensed Material - Program-Property of IBM                      *
  7. *  (C) Copyright IBM Corp. 1991, 1995 - All Right Reserved.           *
  8. *                                                                     *
  9. *  US Government Users Restricted Rights - Use, duplication or        *
  10. *  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  *
  11. *                                                                     *
  12. *  VisualAge, and IBM are trademarks or registered trademarks of      *
  13. *  International Business Machines Corporation.                       *
  14. *  Windows is a registered trademark of Microsoft Corporation.        *
  15. *                                                                     *
  16. **********************************************************************/
  17.  
  18. #ifndef _IASB_H
  19. #define _IASB_H
  20.  
  21. #include <iaeqsrt.h>
  22. #include <iiasb.h>
  23.  
  24. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  25. #pragma pack (4)
  26.  
  27. #pragma SOMAsDefault (off)
  28.  
  29. template <class Element>
  30. class IASortedBag :
  31.   public IAEqualitySortedCollection <Element> {
  32.  
  33.   typedef  IAEqualitySortedCollection <Element> Inherited;
  34.  
  35.   typedef  IASortedBagImpl Implementation;
  36.  
  37. public:
  38.  
  39.            IASortedBag
  40.                             (INotifier&);
  41.  
  42.           ~IASortedBag
  43.                             ();
  44.  
  45.   void     addDifference    (IASortedBag <Element> const&,
  46.                              IASortedBag <Element> const&); 
  47.  
  48.   void     addIntersection  (IASortedBag <Element> const&,
  49.                              IASortedBag <Element> const&);
  50.  
  51.   void     addUnion         (IASortedBag <Element> const&,
  52.                              IASortedBag <Element> const&);
  53.  
  54.   long     compare          (IASortedBag <Element> const&,
  55.                              long (*comparisonFunction)
  56.                               (Element const&, Element const&)) const;
  57.  
  58.   void     differenceWith   (IASortedBag <Element> const&);
  59.  
  60.   void     intersectionWith (IASortedBag <Element> const&);
  61.  
  62.   INumber  numberOfDifferentElements
  63.                             () const;
  64.  
  65.   IBoolean setToNextDifferentElement
  66.                             (ICursor&) const;
  67.  
  68.   void     unionWith        (IASortedBag <Element> const&);
  69.  
  70.   IBoolean operator==       (IASortedBag
  71.                               <Element> const&) const;
  72.  
  73.   IBoolean operator!=       (IASortedBag
  74.                               <Element> const&) const;
  75.  
  76. protected:
  77.  
  78.            IASortedBag
  79.                             ();
  80.  
  81.            IASortedBag
  82.                             (IASortedBag <Element> const&);
  83.  
  84. private:
  85.  
  86.   static
  87.   Implementation&
  88.            ImplOf           (IASortedBag <Element> const&);
  89.  
  90.  
  91. };
  92.  
  93. #include <iasb.inl>
  94.  
  95. #pragma SOMAsDefault (pop)
  96.  
  97. #pragma info (restore)
  98. #pragma pack ()
  99.  
  100. #endif
  101.