home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iaset.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.9 KB  |  99 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 _IASET_H
  19. #define _IASET_H
  20.  
  21. #include <iaequal.h>
  22. #include <iiaset.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 IASet :
  31.   public IAEqualityCollection <Element> {
  32.  
  33.   typedef  IAEqualityCollection <Element> Inherited;
  34.  
  35.   typedef  IASetImpl Implementation;
  36.  
  37. public:
  38.  
  39.            IASet
  40.                             (INotifier&);
  41.  
  42.           ~IASet
  43.                             ();
  44.  
  45.   void     addDifference    (IASet <Element> const&,
  46.                              IASet <Element> const&); 
  47.  
  48.   void     addIntersection  (IASet <Element> const&,
  49.                              IASet <Element> const&);
  50.  
  51.   void     addUnion         (IASet <Element> const&,
  52.                              IASet <Element> const&);
  53.  
  54.   void     differenceWith   (IASet <Element> const&);
  55.  
  56.   void     intersectionWith (IASet <Element> const&);
  57.  
  58.   void     unionWith        (IASet <Element> const&);
  59.  
  60.   IBoolean operator==       (IASet
  61.                               <Element> const&) const;
  62.  
  63.   IBoolean operator!=       (IASet
  64.                               <Element> const&) const;
  65.  
  66. protected:
  67.  
  68.            IASet
  69.                             ();
  70.  
  71.            IASet
  72.                             (IASet <Element> const&);
  73.  
  74.   IBoolean locateNext       (Element const&, ICursor&) const;
  75.  
  76.   INumber  numberOfOccurrences
  77.                             (Element const&) const;
  78.  
  79.   INumber  removeAllOccurrences
  80.                             (Element const&);
  81.  
  82. private:
  83.  
  84.   static
  85.   Implementation&
  86.            ImplOf           (IASet <Element> const&);
  87.  
  88.  
  89. };
  90.  
  91. #include <iaset.inl>
  92.  
  93. #pragma SOMAsDefault (pop)
  94.  
  95. #pragma info (restore)
  96. #pragma pack ()
  97.  
  98. #endif
  99.