home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iarel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.1 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 _IAREL_H
  19. #define _IAREL_H
  20.  
  21. #include <iaeqkey.h>
  22. #include <iiarel.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 IARelation :
  31.   public IAEqualityKeyCollection <Element, Key> {
  32.  
  33.   typedef  IAEqualityKeyCollection <Element, Key> Inherited;
  34.  
  35.   typedef  IARelationImpl Implementation;
  36.  
  37. public:
  38.  
  39.            IARelation
  40.                             (INotifier&);
  41.  
  42.           ~IARelation
  43.                             ();
  44.  
  45.   void     addDifference    (IARelation <Element, Key> const&,
  46.                              IARelation <Element, Key> const&); 
  47.  
  48.   void     addIntersection  (IARelation <Element, Key> const&,
  49.                              IARelation <Element, Key> const&);
  50.  
  51.   void     addUnion         (IARelation <Element, Key> const&,
  52.                              IARelation <Element, Key> const&);
  53.  
  54.   void     differenceWith   (IARelation <Element, Key> const&);
  55.  
  56.   void     intersectionWith (IARelation <Element, Key> const&);
  57.  
  58.   void     unionWith        (IARelation <Element, Key> const&);
  59.  
  60.   IBoolean operator==       (IARelation
  61.                               <Element, Key> const&) const;
  62.  
  63.   IBoolean operator!=       (IARelation
  64.                               <Element, Key> const&) const;
  65.  
  66. protected:
  67.  
  68.            IARelation
  69.                             ();
  70.  
  71.            IARelation
  72.                             (IARelation <Element, Key> 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           (IARelation <Element, Key> const&);
  87.  
  88.  
  89. };
  90.  
  91. #include <iarel.inl>
  92.  
  93. #pragma SOMAsDefault (pop)
  94.  
  95. #pragma info (restore)
  96. #pragma pack ()
  97.  
  98. #endif
  99.