mirror of
https://github.com/boostorg/detail.git
synced 2025-07-30 12:27:15 +02:00
update visibility attributes
This commit is contained in:
@ -113,8 +113,9 @@ public:
|
|||||||
explicit utf8_codecvt_facet(std::size_t no_locale_manage=0)
|
explicit utf8_codecvt_facet(std::size_t no_locale_manage=0)
|
||||||
: std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
|
: std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
|
||||||
{}
|
{}
|
||||||
|
virtual ~utf8_codecvt_facet(){}
|
||||||
protected:
|
protected:
|
||||||
virtual std::codecvt_base::result do_in(
|
BOOST_UTF8_DECL virtual std::codecvt_base::result do_in(
|
||||||
std::mbstate_t& state,
|
std::mbstate_t& state,
|
||||||
const char * from,
|
const char * from,
|
||||||
const char * from_end,
|
const char * from_end,
|
||||||
@ -124,7 +125,7 @@ protected:
|
|||||||
wchar_t*& to_next
|
wchar_t*& to_next
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
virtual std::codecvt_base::result do_out(
|
BOOST_UTF8_DECL virtual std::codecvt_base::result do_out(
|
||||||
std::mbstate_t & state,
|
std::mbstate_t & state,
|
||||||
const wchar_t * from,
|
const wchar_t * from,
|
||||||
const wchar_t * from_end,
|
const wchar_t * from_end,
|
||||||
@ -148,11 +149,11 @@ protected:
|
|||||||
return get_octet_count(lead_octet) - 1;
|
return get_octet_count(lead_octet) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int get_octet_count(unsigned char lead_octet);
|
BOOST_UTF8_DECL static unsigned int get_octet_count(unsigned char lead_octet);
|
||||||
|
|
||||||
// How many "continuing octets" will be needed for this word
|
// How many "continuing octets" will be needed for this word
|
||||||
// == total octets - 1.
|
// == total octets - 1.
|
||||||
int get_cont_octet_out_count(wchar_t word) const ;
|
BOOST_UTF8_DECL int get_cont_octet_out_count(wchar_t word) const ;
|
||||||
|
|
||||||
virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
|
virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
|
||||||
return false;
|
return false;
|
||||||
@ -176,7 +177,7 @@ protected:
|
|||||||
|
|
||||||
// How many char objects can I process to get <= max_limit
|
// How many char objects can I process to get <= max_limit
|
||||||
// wchar_t objects?
|
// wchar_t objects?
|
||||||
virtual int do_length(
|
BOOST_UTF8_DECL virtual int do_length(
|
||||||
const std::mbstate_t &,
|
const std::mbstate_t &,
|
||||||
const char * from,
|
const char * from,
|
||||||
const char * from_end,
|
const char * from_end,
|
||||||
|
@ -31,7 +31,7 @@ BOOST_UTF8_BEGIN_NAMESPACE
|
|||||||
// implementation for wchar_t
|
// implementation for wchar_t
|
||||||
|
|
||||||
// Translate incoming UTF-8 into UCS-4
|
// Translate incoming UTF-8 into UCS-4
|
||||||
std::codecvt_base::result utf8_codecvt_facet::do_in(
|
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in(
|
||||||
std::mbstate_t& /*state*/,
|
std::mbstate_t& /*state*/,
|
||||||
const char * from,
|
const char * from,
|
||||||
const char * from_end,
|
const char * from_end,
|
||||||
@ -108,7 +108,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_in(
|
|||||||
else return std::codecvt_base::partial;
|
else return std::codecvt_base::partial;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::codecvt_base::result utf8_codecvt_facet::do_out(
|
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out(
|
||||||
std::mbstate_t& /*state*/,
|
std::mbstate_t& /*state*/,
|
||||||
const wchar_t * from,
|
const wchar_t * from,
|
||||||
const wchar_t * from_end,
|
const wchar_t * from_end,
|
||||||
@ -170,7 +170,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out(
|
|||||||
|
|
||||||
// How many char objects can I process to get <= max_limit
|
// How many char objects can I process to get <= max_limit
|
||||||
// wchar_t objects?
|
// wchar_t objects?
|
||||||
int utf8_codecvt_facet::do_length(
|
BOOST_UTF8_DECL int utf8_codecvt_facet::do_length(
|
||||||
const std::mbstate_t &,
|
const std::mbstate_t &,
|
||||||
const char * from,
|
const char * from,
|
||||||
const char * from_end,
|
const char * from_end,
|
||||||
@ -201,7 +201,7 @@ int utf8_codecvt_facet::do_length(
|
|||||||
return static_cast<int>(from_next-from_end);
|
return static_cast<int>(from_next-from_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int utf8_codecvt_facet::get_octet_count(
|
BOOST_UTF8_DECL unsigned int utf8_codecvt_facet::get_octet_count(
|
||||||
unsigned char lead_octet
|
unsigned char lead_octet
|
||||||
){
|
){
|
||||||
// if the 0-bit (MSB) is 0, then 1 character
|
// if the 0-bit (MSB) is 0, then 1 character
|
||||||
@ -273,7 +273,7 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
|
|||||||
|
|
||||||
// How many "continuing octets" will be needed for this word
|
// How many "continuing octets" will be needed for this word
|
||||||
// == total octets - 1.
|
// == total octets - 1.
|
||||||
int utf8_codecvt_facet::get_cont_octet_out_count(
|
BOOST_UTF8_DECL int utf8_codecvt_facet::get_cont_octet_out_count(
|
||||||
wchar_t word
|
wchar_t word
|
||||||
) const {
|
) const {
|
||||||
return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
|
return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
|
||||||
|
Reference in New Issue
Block a user