arabica/include/convert/iso88591utf8codecvt.hpp

58 lines
1.6 KiB
C++
Raw Normal View History

2003-08-29 15:45:53 +02:00
#ifndef ARABICA_ISO88591UTF8ISO88591_CODECVT_H
#define ARABICA_ISO88591UTF8ISO88591_CODECVT_H
#include <locale>
2007-09-05 00:55:47 +02:00
#include <SAX/ArabicaConfig.hpp>
2003-08-29 15:45:53 +02:00
#ifdef ARABICA_VS6_WORKAROUND
2003-08-29 15:45:53 +02:00
namespace std {
typedef ::mbstate_t mbstate_t;
}
#endif
2003-09-11 16:05:18 +02:00
namespace Arabica
{
namespace convert
{
2003-08-29 15:45:53 +02:00
class iso88591utf8codecvt : public std::codecvt<char, char, std::mbstate_t>
{
protected:
virtual ~iso88591utf8codecvt() { }
virtual result do_out(std::mbstate_t&,
const char* from,
const char* from_end,
const char*& from_next,
char* to,
char* to_limit,
char*& to_next) const;
virtual result do_in(std::mbstate_t&,
const char* from,
const char* from_end,
const char*& from_next,
char* to,
char* to_limit,
char*& to_next) const;
virtual result do_unshift(std::mbstate_t&,
char*,
char*,
char*&) const;
virtual int do_encoding() const throw() { return 1; }
virtual bool do_always_noconv() const throw() { return false; }
virtual int do_length(const std::mbstate_t&,
const char* from,
const char* end,
size_t max) const;
virtual int do_max_length() const throw() { return 1; }
}; // class iso88591utf8codecvt
2003-09-11 16:05:18 +02:00
} // namespace convert
} // namespace Arabica
2003-08-29 15:45:53 +02:00
#endif