home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
SAMPLES
/
ICLCC
/
TRANSELM.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-07
|
3KB
|
52 lines
/******************************************************************************/
/* */
/* COPYRIGHT: */
/* ---------- */
/* Copyright (C) International Business Machines Corp., 1991,1992. */
/* */
/* DISCLAIMER OF WARRANTIES: */
/* ------------------------- */
/* The following [enclosed] code is sample code created by IBM */
/* Corporation. This sample code is not part of any standard IBM product */
/* and is provided to you solely for the purpose of assisting you in the */
/* development of your applications. The code is provided "AS IS", */
/* without warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/* */
/******************************************************************************/
/*-------------------------------------------------------------*\
| transelm.h - Class TranslationElement for use with the |
| Translation Table example. |
\*-------------------------------------------------------------*/
#include <iglobals.h>
class TranslationElement {
public:
char asc_code;
char ebc_code;
/* Let the compiler generate Default and Copy Constructor,*/
/* Destructor and Assignment for us. */
TranslationElement(char asc, char ebc)
: asc_code(asc), ebc_code(ebc) {};
/* We need to define the equality. */
Boolean operator == (TranslationElement const& te) const {
return asc_code == te.asc_code
&& ebc_code == te.ebc_code;
};
/* 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. */
};