#include <Locale.h>
Public Member Functions | |
| Locale () | |
| Default ctor. | |
| Locale (const std::string &code_r) | |
| Ctor taking a string. | |
| Locale (const LanguageCode &language_r, const CountryCode &country_r=CountryCode()) | |
| Ctor taking LanguageCode and optional CountryCode. | |
| ~Locale () | |
| Dtor. | |
| const LanguageCode & | language () const |
| const CountryCode & | country () const |
| std::string | code () const |
| Return the locale code. | |
| std::string | name () const |
| Return the name made of language and country name. | |
| Locale | fallback () const |
| Return a fallback locale for this locale, when giving up, returns empty Locale(). | |
Static Public Attributes | |
Locale constants. | |
| static const Locale | noCode |
| No or empty code. | |
Private Attributes | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const Locale &obj) |
| Stream output. | |
Related Functions | |
| (Note that these are not member functions.) | |
| template<> | |
| bool | operator() (const zypp::Locale &lhs, const zypp::Locale &rhs) const |
| Default order for std::container based on code string value. | |
| bool | operator== (const Locale &lhs, const Locale &rhs) |
| Comparison based on string value. | |
| bool | operator== (const std::string &lhs, const Locale &rhs) |
| bool | operator== (const Locale &lhs, const std::string &rhs) |
| bool | operator!= (const Locale &lhs, const Locale &rhs) |
| bool | operator!= (const std::string &lhs, const Locale &rhs) |
| bool | operator!= (const Locale &lhs, const std::string &rhs) |
Classes | |
| struct | Impl |
| Locale implementation. More... | |
Definition at line 31 of file Locale.h.
| zypp::Locale::Locale | ( | ) |
Default ctor.
Definition at line 136 of file Locale.cc.
Referenced by zypp::Locale::Impl::fallback().
| zypp::Locale::Locale | ( | const std::string & | code_r | ) | [explicit] |
| zypp::Locale::Locale | ( | const LanguageCode & | language_r, | |
| const CountryCode & | country_r = CountryCode() | |||
| ) |
| const LanguageCode & zypp::Locale::language | ( | ) | const |
| const CountryCode & zypp::Locale::country | ( | ) | const |
| std::string zypp::Locale::code | ( | ) | const |
Return the locale code.
Definition at line 188 of file Locale.cc.
References _pimpl.
Referenced by zypp::cache::CacheStore::appendStringAttributeTranslation(), zypp::repo::susetags::Downloader::download(), zypp::parser::susetags::RepoParser::Impl::haveLocale(), operator()(), operator==(), zypp::parser::susetags::RepoParser::Impl::parseLocaleIf(), zypp::solver::detail::QueueItemRequire::process(), and zypp::cache::ResolvableQuery::Impl::queryStringAttributeTranslationInternal().
| std::string zypp::Locale::name | ( | ) | const |
Return the name made of language and country name.
Definition at line 196 of file Locale.cc.
References _pimpl.
Referenced by zypp::detail::LanguageImpl::summary().
| Locale zypp::Locale::fallback | ( | ) | const |
Return a fallback locale for this locale, when giving up, returns empty Locale().
Definition at line 204 of file Locale.cc.
References _pimpl.
Referenced by zypp::repo::susetags::Downloader::download(), zypp::parser::susetags::RepoParser::Impl::parseLocaleIf(), zypp::solver::detail::QueueItemRequire::process(), and zypp::TranslatedText::Impl::text().
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const Locale & | obj | |||
| ) | [friend] |
| bool operator== | ( | const std::string & | lhs, | |
| const Locale & | rhs | |||
| ) | [related] |
| bool operator== | ( | const Locale & | lhs, | |
| const std::string & | rhs | |||
| ) | [related] |
| bool operator!= | ( | const std::string & | lhs, | |
| const Locale & | rhs | |||
| ) | [related] |
| bool operator!= | ( | const Locale & | lhs, | |
| const std::string & | rhs | |||
| ) | [related] |
| bool operator() | ( | const zypp::Locale & | lhs, | |
| const zypp::Locale & | rhs | |||
| ) | const [related] |
const Locale zypp::Locale::noCode [static] |
No or empty code.
Definition at line 58 of file Locale.h.
Referenced by zypp::Language::availableInstance(), zypp::zypp_detail::defaultTextLocale(), zypp::repo::susetags::Downloader::download(), zypp::Language::installedInstance(), zypp::parser::susetags::RepoParser::Impl::parseLocaleIf(), zypp::solver::detail::QueueItemRequire::process(), and zypp::TranslatedText::Impl::text().
RW_pointer<Impl> zypp::Locale::_pimpl [private] |
Pointer to implementation.
Definition at line 78 of file Locale.h.
Referenced by code(), country(), fallback(), language(), and name().
1.5.3