File indexing completed on 2024-05-05 17:57:58

0001 /*
0002     This file is part of the Okteta Core library, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2004, 2011 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef OKTETA_EBCDIC1047CHARCODEC_HPP
0010 #define OKTETA_EBCDIC1047CHARCODEC_HPP
0011 
0012 // lib
0013 #include <charcodec.hpp>
0014 
0015 namespace Okteta {
0016 
0017 //
0018 class EBCDIC1047CharCodec : public CharCodec
0019 {
0020 public:
0021     EBCDIC1047CharCodec(const EBCDIC1047CharCodec&) = delete;
0022     EBCDIC1047CharCodec& operator=(const EBCDIC1047CharCodec&) = delete;
0023 
0024 protected:
0025     EBCDIC1047CharCodec();
0026 
0027 public: // CharCodec API
0028     Character decode(Byte byte) const override;
0029     bool encode(Byte* byte, const QChar& _char) const override;
0030     bool canEncode(const QChar& _char) const override;
0031     const QString& name() const override;
0032 
0033 public:
0034     static EBCDIC1047CharCodec* create();
0035     static const QString& codecName();
0036 };
0037 
0038 inline EBCDIC1047CharCodec::EBCDIC1047CharCodec() = default;
0039 
0040 inline EBCDIC1047CharCodec* EBCDIC1047CharCodec::create() { return new EBCDIC1047CharCodec(); }
0041 
0042 }
0043 
0044 #endif