home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iakey.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.4 KB  |  115 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 _IAKEY_H
  19. #define _IAKEY_H
  20.  
  21. #include <iacllct.h>
  22.  
  23. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  24. #pragma pack (4)
  25.  
  26. #pragma SOMAsDefault (off)
  27.  
  28. template <class Element, class Key>
  29. class IAKeyCollection : public virtual IACollection <Element> {
  30.  
  31.   typedef  IACollectionImpl Implementation;
  32.  
  33. public:
  34.  
  35.            IAKeyCollection  (INotifier&);
  36.  
  37.           ~IAKeyCollection  ();
  38.  
  39.   IBoolean addOrReplaceElementWithKey
  40.                             (Element const&);
  41.  
  42.   IBoolean addOrReplaceElementWithKey
  43.                             (Element const&, ICursor&);
  44.  
  45.   IBoolean containsAllKeysFrom
  46.                             (IACollection <Element> const&) const; 
  47.  
  48.   IBoolean containsElementWithKey
  49.                             (Key const&) const;
  50.  
  51.   Element& elementWithKey   (Key const&);
  52.  
  53.   Element const&
  54.            elementWithKey   (Key const&) const;
  55.  
  56.   Key const&
  57.            key              (Element const&) const;
  58.  
  59.   IBoolean locateElementWithKey
  60.                             (Key const&, ICursor&) const;
  61.  
  62.   IBoolean locateNextElementWithKey
  63.                             (Key const&, ICursor&) const;
  64.  
  65.   IBoolean locateOrAddElementWithKey
  66.                             (Element const&);
  67.  
  68.   IBoolean locateOrAddElementWithKey
  69.                             (Element const&, ICursor&);
  70.  
  71.   INumber  numberOfDifferentKeys
  72.                             () const;
  73.  
  74.   INumber  numberOfElementsWithKey
  75.                             (Key const&) const;
  76.  
  77.   INumber  removeAllElementsWithKey
  78.                             (Key const&);
  79.  
  80.   IBoolean removeElementWithKey
  81.                             (Key const&);
  82.  
  83.   IBoolean replaceElementWithKey
  84.                             (Element const&);
  85.  
  86.   IBoolean replaceElementWithKey
  87.                             (Element const&, ICursor&);
  88.  
  89.   IBoolean setToNextWithDifferentKey
  90.                             (ICursor&) const;
  91.  
  92. protected:
  93.  
  94.            IAKeyCollection  ();
  95.  
  96.            IAKeyCollection  (IAKeyCollection <Element, Key> const&);
  97.  
  98. private:
  99.  
  100.   static
  101.   Implementation&
  102.            ImplOf           (IAKeyCollection <Element, Key> const&);
  103.  
  104.  
  105. };
  106.  
  107. #pragma SOMAsDefault (pop)
  108.  
  109. #include <iakey.inl>
  110.  
  111. #pragma info (restore)
  112. #pragma pack ()
  113.  
  114. #endif
  115.