home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IAKEY.C < prev    next >
Text File  |  1993-09-22  |  1KB  |  27 lines

  1. /*******************************************************************************
  2. *                                                                              *
  3. * COPYRIGHT:                                                                   *
  4. *   IBM C/C++ Tools Version 2.01 - Collection Class Library                    *
  5. *   Licensed Materials - Property of IBM                                       *
  6. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  7. *   All Rights Reserved                                                        *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  10. *                                                                              *
  11. *******************************************************************************/
  12. template <class Element, class Key>
  13. IBoolean IAKeyCollection < Element, Key >::
  14. containsAllKeysFrom (IACollection < Element > const& collection) const
  15. { IBoolean result = True;
  16.   ICursor *cursor = collection.newCursor ();
  17.   forCursor (*cursor) {
  18.     if (! containsElementWithKey (key (collection.elementAt (*cursor)))) {
  19.       result = False;
  20.       break;
  21.     }
  22.   }
  23.   delete cursor;
  24.   return result;
  25. };
  26.  
  27.