📄 ebcdicconverter.hpp
字号:
//=============================================================================
// BBDSoft General component library
// Copyright (C) 2001, UAB "BBD SOFT" ( http://www.bbdsoft.com/ )
//
// This material is provided "as is", with absolutely no warranty expressed
// or implied. Any use is at your own risk.
//
// Permission to use or copy this software for any purpose is hereby granted
// without fee, provided the above notices are retained on all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided the above notices are retained, and a notice that the code was
// modified is included with the above copyright notice.
//
// The author of this program may be contacted at developers@bbdsoft.com
//=============================================================================
#ifndef _EBCDICCONVERTER_
#define _EBCDICCONVERTER_
#ifndef _STRING_
#include <string>
#endif
using std::string;
//-----------------------------------------------------------------------------
class EBCDICConverter
{
public:
static char toASCII (const char inChar);
static char toEBCDIC (const char inChar);
static string toASCII (const string & inString);
static string toEBCDIC (const string & inString);
// IBM Mainframe uses big endian
// i.e. most significant byte first
// INTEL processor uses little endian
// i.e. least significant byte first
static short swapShort (const short inWord);
static long swapLong (const long inDWord);
protected:
private:
EBCDICConverter ();
~EBCDICConverter ();
// disable copy constructor and assignment operator
EBCDICConverter ( const EBCDICConverter & );
EBCDICConverter & operator = ( const EBCDICConverter & );
static char theEBCDICtoASCIITable [256];
static char theASCIItoEBCDICTable [256];
}; // end EBCDICConverter class declaration
#include "ebcdicconverter.inl"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -