CppCMS
|
a facet that holds general information about locale More...
#include <booster/booster/locale/info.h>
Public Types | |
enum | string_propery { language_property, country_property, variant_property, encoding_property, name_property } |
enum | integer_property { utf8_property } |
Public Member Functions | |
info (size_t refs=0) | |
std::string | language () const |
std::string | country () const |
std::string | variant () const |
std::string | encoding () const |
std::string | name () const |
bool | utf8 () const |
Static Public Attributes | |
static std::locale::id | id |
This member uniquely defines this facet, required by STL. | |
Protected Member Functions | |
virtual std::string | get_string_property (string_propery v) const =0 |
virtual int | get_integer_property (integer_property v) const =0 |
a facet that holds general information about locale
This facet should be always created in order to make all Boost.Locale functions work
booster::locale::info::info | ( | size_t | refs = 0 | ) | [inline] |
Standard facet's constructor
std::string booster::locale::info::country | ( | ) | const [inline] |
Get country name
std::string booster::locale::info::encoding | ( | ) | const [inline] |
Get encoding
virtual int booster::locale::info::get_integer_property | ( | integer_property | v | ) | const [protected, pure virtual] |
Get integer property by its id v
virtual std::string booster::locale::info::get_string_property | ( | string_propery | v | ) | const [protected, pure virtual] |
Get string property by its id v
std::string booster::locale::info::language | ( | ) | const [inline] |
Get language name
std::string booster::locale::info::name | ( | ) | const [inline] |
Get the name of the locale, like en_US.UTF-8
bool booster::locale::info::utf8 | ( | ) | const [inline] |
True if the underlying encoding is UTF-8 (for char streams and strings)
std::string booster::locale::info::variant | ( | ) | const [inline] |
Get locale variant