|
libosmscout 0.1
|
#include <Locale.h>
Public Member Functions | |
| std::string | GetDecimalSeparator () const |
| DistanceUnitSystem | GetDistanceUnits () const |
| std::string | GetThousandsSeparator () const |
| std::string | GetUnitsSeparator () const |
| Locale ()=default | |
| Default constructor initialise locale with default locale. | |
| Locale (const DistanceUnitSystem &distanceUnits, const std::string &decimalSeparator, const std::string &thousandsSeparator) | |
| Locale (const Locale &)=default | |
| Locale (Locale &&)=default | |
| Locale & | operator= (const Locale &)=default |
| Locale & | operator= (Locale &&)=default |
| void | SetDecimalSeparator (const std::string &separator) |
| void | SetDistanceUnits (const DistanceUnitSystem &units) |
| void | SetThousandsSeparator (const std::string &separator) |
| void | SetUnitsSeparator (const std::string &separator) |
| ~Locale ()=default | |
Static Public Member Functions | |
| static Locale | ByEnvironment () |
| Creates Locale defined by current environment. | |
| static Locale | ByEnvironmentSafe () |
| Creates Locale defined by current environment, it is not throwing exception when environment locale is incorrect, it just return default Locale instead. | |
| static Locale | FromStdLocale (std::locale locale) |
| Creates Locale from provided std::locale. | |
|
default |
Default constructor initialise locale with default locale.
It is equivalent to LC_ALL=C
To initialise locale by environment, use static method ByEnvironment
Referenced by ByEnvironment(), ByEnvironmentSafe(), FromStdLocale(), Locale(), Locale(), operator=(), and operator=().
| osmscout::Locale::Locale | ( | const DistanceUnitSystem & | distanceUnits, |
| const std::string & | decimalSeparator, | ||
| const std::string & | thousandsSeparator ) |
|
default |
References Locale().
|
default |
References Locale().
|
default |
|
inlinestatic |
Creates Locale defined by current environment.
| std::runtime_error | when locale defined by environment is undefined |
References FromStdLocale(), and Locale().
Referenced by ByEnvironmentSafe().
|
inlinestatic |
Creates Locale defined by current environment, it is not throwing exception when environment locale is incorrect, it just return default Locale instead.
References ByEnvironment(), Locale(), and osmscout::log.
Referenced by osmscout::NavigationModule::playMessageRequested(), and osmscout::InstalledVoicesModel::playTTSSample().
|
static |
Creates Locale from provided std::locale.
References osmscout::Imperial, Locale(), SetDecimalSeparator(), SetDistanceUnits(), SetThousandsSeparator(), and osmscout::WStringToUTF8String().
Referenced by ByEnvironment().
|
inline |
Referenced by osmscout::FloatToString().
|
inline |
Referenced by osmscout::EleFeatureValue::GetLabel().
|
inline |
Referenced by osmscout::FloatToString(), and osmscout::NumberToString().
|
inline |
|
inline |
Referenced by FromStdLocale().
|
inline |
|
inline |
Referenced by FromStdLocale().
|
inline |