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