home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / bbxxj / iamap.h__ / IAMAP.H
Encoding:
C/C++ Source or Header  |  1992-10-26  |  1.9 KB  |  61 lines

  1. /* Copyright (c) IBM Corp. 1992 */
  2.  
  3. #ifndef _IAMAP_H
  4. #define _IAMAP_H
  5.  
  6. #include <iglobals.h>
  7. #include <icursor.h>
  8. #include <iaeqkey.h>
  9.  
  10. template < class Element, class Key >
  11. class IAMap :
  12.   public virtual IAEqualityKeyCollection < Element, Key > {
  13. public:
  14.  
  15.   virtual Boolean        operator ==                 (IAMap < Element, Key > const&) const;
  16.  
  17.   virtual Boolean        operator !=                 (IAMap < Element, Key > const&) const;
  18.  
  19.   virtual void           unionWith                   (IAMap < Element, Key > const&);
  20.  
  21.   virtual void           intersectionWith            (IAMap < Element, Key > const&);
  22.  
  23.   virtual void           differenceWith              (IAMap < Element, Key > const&);
  24.  
  25.   virtual void           addUnion                    (IAMap < Element, Key > const&,
  26.                                                IAMap < Element, Key > const&);
  27.  
  28.   virtual void           addIntersection             (IAMap < Element, Key > const&,
  29.                                                IAMap < Element, Key > const&);
  30.  
  31.   virtual void           addDifference               (IAMap < Element, Key > const&,
  32.                                                IAMap < Element, Key > const&);
  33.  
  34. protected:
  35.  
  36.    INumber        numberOfOccurrences         (Element const&) const;
  37.  
  38.    Boolean        locateNext                  (Element const&, ICursor&)
  39.                                                const;
  40.  
  41.    INumber        removeAllOccurrences        (Element const&);
  42.  
  43.    INumber        numberOfElementsWithKey     (Key const&) const;
  44.  
  45.    Boolean        locateNextElementWithKey    (Key const&,
  46.                                                ICursor&) const;
  47.  
  48.    INumber        removeAllElementsWithKey    (Key const&);
  49.  
  50.    INumber        numberOfDifferentKeys       () const;
  51.  
  52.    Boolean        setToNextWithDifferentKey   (ICursor&) const;
  53.  
  54. };
  55.  
  56. #ifdef __IBMCPP__
  57. #include <iamap.c>
  58. #endif
  59.  
  60. #endif
  61.