home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / TRANSTAB / TRMAPOPS.H < prev    next >
Text File  |  1995-03-15  |  2KB  |  48 lines

  1. /*************************************************************************
  2.   IBM C/C++ Tools Version 3.00 - Collection Class Library
  3.  (C) Copyright IBM Corporation 1992 ,1995, Licensed Program-Property of
  4.  IBM.  All Rights Reserved.  US Government Users Restricted Rights - Use,
  5.  duplication or disclosure restricted by GSA ADP Schedule Contract with
  6.  IBM Corp.
  7.  *************************************************************************/
  8.  
  9. /*-------------------------------------------------------------*\
  10. |  trmapops.h  -  Translation Map Operations                    |
  11. |                 This is the base class for the element        |
  12. |                 operations for our Translation Map example.   |
  13. \*-------------------------------------------------------------*/
  14. #ifndef _TRMAPOPS_H
  15. #define _TRMAPOPS_H
  16.  
  17.        /* Get the standard operation classes.                  */
  18. #include <istdops.h>
  19.  
  20. #include "transelm.h"
  21.  
  22. class TranslationOps : public IEOps < TranslationElement >
  23. {
  24. public:
  25.   class KeyOps : public IStdEqOps < char >, public IStdHshOps < char >
  26.   {
  27.   }  keyOps;
  28. };
  29.  
  30.        /* Operations Class for the EBCDIC-ASCII mapping:       */
  31. class TranslationOpsE2A : public TranslationOps
  32. {
  33. public:                     /* Key Access                      */
  34.   char const& key (TranslationElement const& te) const
  35.     { return te.ebcCode (); }
  36. };
  37.  
  38.  
  39.        /* Operations Class for the ASCII-EBCDIC mapping:       */
  40. class TranslationOpsA2E : public TranslationOps
  41. {
  42. public:                     /* Key Access                      */
  43.   char const& key (TranslationElement const& te) const
  44.     { return te.ascCode (); }
  45. };
  46.  
  47. #endif
  48.