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