home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / transtab / trmapops.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.3 KB  |  57 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. /*-------------------------------------------------------------*\
  19. |  trmapops.h  -  Translation Map Operations                    |
  20. |                 This is the base class for the element        |
  21. |                 operations for our Translation Map example.   |
  22. \*-------------------------------------------------------------*/
  23. #ifndef _TRMAPOPS_H
  24. #define _TRMAPOPS_H
  25.  
  26.        /* Get the standard operation classes.                  */
  27. #include <istdops.h>
  28.  
  29. #include "transelm.h"
  30.  
  31. class TranslationOps : public IEOps < TranslationElement >
  32. {
  33. public:
  34.   class KeyOps : public IStdEqOps < char >, public IStdHshOps < char >
  35.   {
  36.   }  keyOps;
  37. };
  38.  
  39.        /* Operations Class for the EBCDIC-ASCII mapping:       */
  40. class TranslationOpsE2A : public TranslationOps
  41. {
  42. public:                     /* Key Access                      */
  43.   char const& key (TranslationElement const& te) const
  44.     { return te.ebcCode (); }
  45. };
  46.  
  47.  
  48.        /* Operations Class for the ASCII-EBCDIC mapping:       */
  49. class TranslationOpsA2E : public TranslationOps
  50. {
  51. public:                     /* Key Access                      */
  52.   char const& key (TranslationElement const& te) const
  53.     { return te.ascCode (); }
  54. };
  55.  
  56. #endif
  57.