3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
8 #ifndef MSP_STRINGS_JISX201_H_
9 #define MSP_STRINGS_JISX201_H_
16 class JisX0201: public Codec
19 class Encoder: public Codec::Encoder
22 Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em) { }
24 virtual void encode_char(UnicodeChar, std::string &);
26 virtual void transliterate(UnicodeChar, std::string &);
29 class Decoder: public Codec::Decoder
32 Decoder(ErrorMode em = THROW_ON_ERROR): Codec::Decoder(em) { }
34 virtual UnicodeChar decode_char(const std::string &, std::string::const_iterator &);
37 virtual const char *get_name() const { return "JIS X 0201"; }
39 virtual Encoder *create_encoder(ErrorMode em = THROW_ON_ERROR) const { return new Encoder(em); }
40 virtual Decoder *create_decoder(ErrorMode em = THROW_ON_ERROR) const { return new Decoder(em); }