home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
TRANSTAB
/
TRANSELM.H
< prev
next >
Wrap
Text File
|
1995-03-15
|
2KB
|
55 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.
*************************************************************************/
/*-------------------------------------------------------------*\
| transelm.h - Class TranslationElement for use with the |
| Translation Table example. |
\*-------------------------------------------------------------*/
#ifndef _TRANSELM_H
#define _TRANSELM_H
#include <iglobals.h>
class TranslationElement {
char ivAscCode;
char ivEbcCode;
public:
/* Let the compiler generate Default and Copy Constructor,*/
/* Destructor and Assignment for us. */
char const& ascCode () const
{ return ivAscCode;
}
char const& ebcCode () const
{ return ivEbcCode;
}
TranslationElement (char asc, char ebc)
: ivAscCode(asc), ivEbcCode(ebc) {};
/* We need to define the equality. */
IBoolean operator == (TranslationElement const& te) const {
return ivAscCode == te.ivAscCode
&& ivEbcCode == te.ivEbcCode;
};
/* An ordering relation must not be defined for */
/* elements in a map. */
/* We need to define the key access for the elements. */
/* We decided to define all key operations in a */
/* separate operations class in file trmapops.h. */
};
#endif