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 >
Wrap
Text File
|
1995-03-15
|
2KB
|
48 lines
/*************************************************************************
IBM C/C++ Tools Version 3.00 - Collection Class Library
(C) Copyright IBM Corporation 1992 ,1995, Licensed Program-Property of
IBM. All Rights Reserved. US Government Users Restricted Rights - Use,
duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
*************************************************************************/
/*-------------------------------------------------------------*\
| trmapops.h - Translation Map Operations |
| This is the base class for the element |
| operations for our Translation Map example. |
\*-------------------------------------------------------------*/
#ifndef _TRMAPOPS_H
#define _TRMAPOPS_H
/* Get the standard operation classes. */
#include <istdops.h>
#include "transelm.h"
class TranslationOps : public IEOps < TranslationElement >
{
public:
class KeyOps : public IStdEqOps < char >, public IStdHshOps < char >
{
} keyOps;
};
/* Operations Class for the EBCDIC-ASCII mapping: */
class TranslationOpsE2A : public TranslationOps
{
public: /* Key Access */
char const& key (TranslationElement const& te) const
{ return te.ebcCode (); }
};
/* Operations Class for the ASCII-EBCDIC mapping: */
class TranslationOpsA2E : public TranslationOps
{
public: /* Key Access */
char const& key (TranslationElement const& te) const
{ return te.ascCode (); }
};
#endif