home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / runnable / ibmc / ibmclass / iacllct.c < prev    next >
Encoding:
Text File  |  1992-10-26  |  522 b   |  24 lines

  1. /* Copyright (c) IBM Corp. 1992 */
  2. template <class Element>
  3. IACollection <Element> ::~IACollection ()
  4. {
  5. }
  6.  
  7. template <class Element>
  8. void IACollection < Element >::
  9. addAllFrom (IACollection < Element > const& collection)
  10. { ICursor *cursor = collection.newCursor ();
  11.   forCursor (*cursor) {
  12.     add (collection.elementAt (*cursor));
  13.   }
  14.   delete cursor;
  15. };
  16.  
  17. template <class Element>
  18. void IACollection < Element >::
  19. copy (IACollection < Element > const& aSet)
  20. { removeAll ();
  21.   addAllFrom (aSet);
  22. };
  23.  
  24.