X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Futf8.h;h=f170916f1d6c6d39ee1c1eb3d46f77df7068951e;hp=fcf23eff35e55e0a03532f9e9b541ea2ac4a6414;hb=HEAD;hpb=d3fc0bf0f20f100f2831188c1ce21461d21c2c7a diff --git a/source/stringcodec/utf8.h b/source/stringcodec/utf8.h index fcf23ef..c3f4a59 100644 --- a/source/stringcodec/utf8.h +++ b/source/stringcodec/utf8.h @@ -1,35 +1,36 @@ #ifndef MSP_STRINGCODEC_UTF8_H_ #define MSP_STRINGCODEC_UTF8_H_ +#include #include "codec.h" namespace Msp { namespace StringCodec { -class Utf8: public StandardCodec +class MSPCORE_API Utf8: public StandardCodec { public: - class Encoder: public Codec::Encoder + class MSPCORE_API Encoder: public Codec::Encoder { public: - Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em) { } + Encoder(ErrorMode em = DEFAULT): Codec::Encoder(em) { } - virtual void encode_char(unichar, std::string &); + void encode_char(unichar, std::string &) override; private: - virtual void transliterate(unichar, std::string &); + void transliterate(unichar, std::string &) override; }; - class Decoder: public Codec::Decoder + class MSPCORE_API Decoder: public Codec::Decoder { public: - Decoder(ErrorMode em = THROW_ON_ERROR): Codec::Decoder(em) { } + Decoder(ErrorMode em = DEFAULT): Codec::Decoder(em) { } - virtual unichar decode_char(const std::string &, std::string::const_iterator &); + unichar decode_char(const std::string &, std::string::const_iterator &) override; }; - Utf8(ErrorMode em = THROW_ON_ERROR): StandardCodec(em) { } + Utf8(ErrorMode em = DEFAULT): StandardCodec(em) { } - virtual const char *get_name() const { return "UTF-8"; } + const char *get_name() const override { return "UTF-8"; } }; } // namespace StringCodec