8 #ifndef BOOSTER_LOCALE_CONVERTER_H_INCLUDED 9 #define BOOSTER_LOCALE_CONVERTER_H_INCLUDED 11 #include <booster/config.h> 13 # pragma warning(push) 14 # pragma warning(disable : 4275 4251 4231 4660) 47 template<
typename CharType>
50 #ifdef BOOSTER_LOCALE_DOXYGEN 51 template<
typename Char>
61 static std::locale::id id;
71 virtual std::basic_string<Char> convert(
conversion_type how,Char
const *begin,Char
const *end,
int flags = 0)
const = 0;
72 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) 73 std::locale::id& __get_id (
void)
const {
return id; }
81 static std::locale::id id;
83 converter(
size_t refs = 0) : std::locale::facet(refs)
86 virtual std::string convert(
conversion_type how,
char const *begin,
char const *end,
int flags = 0)
const = 0;
87 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) 88 std::locale::id& __get_id (
void)
const {
return id; }
95 static std::locale::id id;
96 converter(
size_t refs = 0) : std::locale::facet(refs)
99 virtual std::wstring convert(
conversion_type how,
wchar_t const *begin,
wchar_t const *end,
int flags = 0)
const = 0;
100 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) 101 std::locale::id& __get_id (
void)
const {
return id; }
105 #ifdef BOOSTER_HAS_CHAR16_T 107 class BOOSTER_API converter<char16_t> :
public converter_base,
public std::locale::facet {
109 static std::locale::id id;
110 converter(
size_t refs = 0) : std::locale::facet(refs)
113 virtual std::u16string convert(
conversion_type how,char16_t
const *begin,char16_t
const *end,
int flags = 0)
const = 0;
114 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) 115 std::locale::id& __get_id (
void)
const {
return id; }
120 #ifdef BOOSTER_HAS_CHAR32_T 122 class BOOSTER_API converter<char32_t> :
public converter_base,
public std::locale::facet {
124 static std::locale::id id;
125 converter(
size_t refs = 0) : std::locale::facet(refs)
128 virtual std::u32string convert(
conversion_type how,char32_t
const *begin,char32_t
const *end,
int flags = 0)
const = 0;
129 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) 130 std::locale::id& __get_id (
void)
const {
return id; }
158 template<
typename CharType>
159 std::basic_string<CharType>
normalize(std::basic_string<CharType>
const &str,norm_type n=
norm_default,std::locale
const &loc=std::locale())
173 template<
typename CharType>
174 std::basic_string<CharType>
normalize(CharType
const *str,norm_type n=
norm_default,std::locale
const &loc=std::locale())
176 CharType
const *end=str;
191 template<
typename CharType>
192 std::basic_string<CharType>
normalize( CharType
const *begin,
195 std::locale
const &loc=std::locale())
208 template<
typename CharType>
209 std::basic_string<CharType>
to_upper(std::basic_string<CharType>
const &str,std::locale
const &loc=std::locale())
219 template<
typename CharType>
220 std::basic_string<CharType>
to_upper(CharType
const *str,std::locale
const &loc=std::locale())
222 CharType
const *end=str;
233 template<
typename CharType>
234 std::basic_string<CharType>
to_upper(CharType
const *begin,CharType
const *end,std::locale
const &loc=std::locale())
247 template<
typename CharType>
248 std::basic_string<CharType>
to_lower(std::basic_string<CharType>
const &str,std::locale
const &loc=std::locale())
258 template<
typename CharType>
259 std::basic_string<CharType>
to_lower(CharType
const *str,std::locale
const &loc=std::locale())
261 CharType
const *end=str;
272 template<
typename CharType>
273 std::basic_string<CharType>
to_lower(CharType
const *begin,CharType
const *end,std::locale
const &loc=std::locale())
285 template<
typename CharType>
286 std::basic_string<CharType>
to_title(std::basic_string<CharType>
const &str,std::locale
const &loc=std::locale())
296 template<
typename CharType>
297 std::basic_string<CharType>
to_title(CharType
const *str,std::locale
const &loc=std::locale())
299 CharType
const *end=str;
310 template<
typename CharType>
311 std::basic_string<CharType>
to_title(CharType
const *begin,CharType
const *end,std::locale
const &loc=std::locale())
324 template<
typename CharType>
325 std::basic_string<CharType>
fold_case(std::basic_string<CharType>
const &str,std::locale
const &loc=std::locale())
335 template<
typename CharType>
336 std::basic_string<CharType>
fold_case(CharType
const *str,std::locale
const &loc=std::locale())
338 CharType
const *end=str;
349 template<
typename CharType>
350 std::basic_string<CharType>
fold_case(CharType
const *begin,CharType
const *end,std::locale
const &loc=std::locale())
std::basic_string< CharType > fold_case(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
Definition: conversion.h:325
std::basic_string< CharType > to_lower(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
Definition: conversion.h:248
std::basic_string< CharType > to_title(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
Definition: conversion.h:286
Convert text to upper case.
Definition: conversion.h:40
std::basic_string< CharType > normalize(std::basic_string< CharType > const &str, norm_type n=norm_default, std::locale const &loc=std::locale())
Definition: conversion.h:159
Canonical decomposition followed by canonical composition.
Definition: conversion.h:143
Convert text to lower case.
Definition: conversion.h:41
std::basic_string< CharType > to_upper(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
Definition: conversion.h:209
Apply Unicode normalization on the text.
Definition: conversion.h:39
Fold case in the text.
Definition: conversion.h:42
Compatibility decomposition.
Definition: conversion.h:144
conversion_type
Definition: conversion.h:38
norm_type
Definition: conversion.h:141
Convert text to title case.
Definition: conversion.h:43
Compatibility decomposition followed by canonical composition.
Definition: conversion.h:145
Definition: conversion.h:48
This is the main namespace that encloses all localization classes.
Definition: locale_fwd.h:14
This class provides base flags for text manipulation. It is used as base for converter facet...
Definition: conversion.h:33
Default normalization - canonical decomposition followed by canonical composition.
Definition: conversion.h:146
Booster library namespace. The library that implements Boost Like API in ABI backward compatible way...
Definition: application.h:23
Canonical decomposition.
Definition: conversion.h:142