home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) IBM Corp. 1992 */
-
- #ifndef _IAKEY_H
- #define _IAKEY_H
-
- #include <iglobals.h>
- #include <icursor.h>
- #include <iacllct.h>
-
- template < class Element, class Key >
- class IAKeyCollection : public virtual IACollection < Element > {
- public:
-
- virtual Key const& key (Element const&) const = 0;
-
- virtual Boolean containsElementWithKey (Key const&) const = 0;
-
- virtual Boolean containsAllKeysFrom (IACollection <Element>
- const&) const;
-
- virtual Boolean locateElementWithKey (Key const&, ICursor&)
- const = 0;
-
- virtual Boolean replaceElementWithKey (Element const&) = 0;
-
- virtual Boolean replaceElementWithKey (Element const&,
- ICursor&) = 0;
-
- virtual Boolean locateOrAddElementWithKey (Element const&) = 0;
-
- virtual Boolean locateOrAddElementWithKey (Element const&,
- ICursor&) = 0;
-
- virtual Boolean addOrReplaceElementWithKey (Element const&) = 0;
-
- virtual Boolean addOrReplaceElementWithKey (Element const&,
- ICursor&) = 0;
-
- virtual Boolean removeElementWithKey (Key const&) = 0;
-
- virtual Element const& elementWithKey (Key const&) const = 0;
-
- virtual Element& elementWithKey (Key const&) = 0;
-
- virtual INumber numberOfElementsWithKey (Key const&) const = 0;
-
- virtual Boolean locateNextElementWithKey (Key const&,
- ICursor&) const = 0;
-
- virtual INumber removeAllElementsWithKey (Key const&) = 0;
-
- virtual INumber numberOfDifferentKeys () const = 0;
-
- virtual Boolean setToNextWithDifferentKey (ICursor&) const = 0;
-
- };
-
- #ifdef __IBMCPP__
- #include <iakey.c>
- #endif
-
- #endif