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

  1. /* Copyright (c) IBM Corp. 1992 */
  2.  
  3. #ifndef _IAKEY_H
  4. #define _IAKEY_H
  5.  
  6. #include <iglobals.h>
  7. #include <icursor.h>
  8. #include <iacllct.h>
  9.  
  10. template < class Element, class Key >
  11. class IAKeyCollection : public virtual IACollection < Element > {
  12. public:
  13.  
  14.   virtual Key const&     key                         (Element const&) const = 0;
  15.  
  16.   virtual Boolean        containsElementWithKey      (Key const&) const = 0;
  17.  
  18.   virtual Boolean        containsAllKeysFrom         (IACollection <Element>
  19.                                                const&) const;
  20.  
  21.   virtual Boolean        locateElementWithKey        (Key const&, ICursor&)
  22.                                                const = 0;
  23.  
  24.   virtual Boolean        replaceElementWithKey       (Element const&) = 0;
  25.  
  26.   virtual Boolean        replaceElementWithKey       (Element const&,
  27.                                                ICursor&) = 0;
  28.  
  29.   virtual Boolean        locateOrAddElementWithKey   (Element const&) = 0;
  30.  
  31.   virtual Boolean        locateOrAddElementWithKey   (Element const&,
  32.                                                ICursor&) = 0;
  33.  
  34.   virtual Boolean        addOrReplaceElementWithKey  (Element const&) = 0;
  35.  
  36.   virtual Boolean        addOrReplaceElementWithKey  (Element const&,
  37.                                                ICursor&) = 0;
  38.  
  39.   virtual Boolean        removeElementWithKey        (Key const&) = 0;
  40.  
  41.   virtual Element const& elementWithKey              (Key const&) const = 0;
  42.  
  43.   virtual Element&       elementWithKey              (Key const&) = 0;
  44.  
  45.   virtual INumber        numberOfElementsWithKey     (Key const&) const = 0;
  46.  
  47.   virtual Boolean        locateNextElementWithKey    (Key const&,
  48.                                                ICursor&) const = 0;
  49.  
  50.   virtual INumber        removeAllElementsWithKey    (Key const&) = 0;
  51.  
  52.   virtual INumber        numberOfDifferentKeys       () const = 0;
  53.  
  54.   virtual Boolean        setToNextWithDifferentKey   (ICursor&) const = 0;
  55.  
  56. };
  57.  
  58. #ifdef __IBMCPP__
  59. #include <iakey.c>
  60. #endif
  61.  
  62. #endif
  63.