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

  1. /* Copyright (c) IBM Corp. 1992 */
  2.  
  3. #ifndef _IAEQUAL_H
  4. #define _IAEQUAL_H
  5.  
  6. #include <iglobals.h>
  7. #include <icursor.h>
  8. #include <iacllct.h>
  9.  
  10. template < class Element >
  11. class IAEqualityCollection : public virtual IACollection < Element > {
  12. public:
  13.  
  14.   virtual Boolean        contains                    (Element const&) const = 0;
  15.  
  16.   virtual Boolean        containsAllFrom             (IACollection <Element>
  17.                                                const&) const;
  18.  
  19.   virtual Boolean        locate                      (Element const&, ICursor&)
  20.                                                const = 0;
  21.  
  22.   virtual Boolean        locateOrAdd                 (Element const&) = 0;
  23.  
  24.   virtual Boolean        locateOrAdd                 (Element const&,
  25.                                                ICursor&) = 0;
  26.  
  27.   virtual Boolean        remove                      (Element const&) = 0;
  28.  
  29.   virtual INumber        numberOfOccurrences         (Element const&) const = 0;
  30.  
  31.   virtual Boolean        locateNext                  (Element const&, ICursor&)
  32.                                                const = 0;
  33.  
  34.   virtual INumber        removeAllOccurrences        (Element const&) = 0;
  35.  
  36. protected:
  37.  
  38.   static Boolean isContained (Element const&, void* env);
  39.   static Boolean isNotContained (Element const&, void* env);
  40.  
  41. };
  42.  
  43. #ifdef __IBMCPP__
  44. #include <iaequal.c>
  45. #endif
  46.  
  47. #endif
  48.