home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iikeyops.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  1.9 KB  |  69 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 _IIKEYOPS_H
  19. #define _IIKEYOPS_H
  20.  
  21. #include <iistream.h>
  22. #include <inumpos.h>
  23. #include <stddef.h>
  24.  
  25.  
  26. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  27. #pragma pack (4)
  28.  
  29. #pragma SOMAsDefault(off)
  30.  
  31. // indirection for keys
  32.  
  33. template <class Key>
  34. void* IKeyFromOps (Key const&);
  35.  
  36. template <class Key>
  37. Key const& IKeyForOps (Key const*);
  38.  
  39. // key extension
  40.  
  41. template <class Element, class ElementOps>
  42. class IOpsWithKey : public ElementOps {
  43. public:
  44.  
  45.   ElementOps
  46.            keyOps;
  47.  
  48.            IOpsWithKey      ();
  49.  
  50.            IOpsWithKey      (void*);
  51.  
  52.   Element const&
  53.            Key              (Element const&) const;
  54.  
  55. protected:
  56.  
  57. private:
  58.  
  59. };
  60.  
  61. #pragma SOMAsDefault(pop)
  62.  
  63. #include <iikeyops.inl>
  64.  
  65. #pragma info (restore)
  66. #pragma pack ()
  67.  
  68. #endif
  69.