29 typedef std::tr1::unordered_set<Locale>
LocaleSet;
55 Locale(
const std::string & code_r );
58 Locale(
const char * code_r );
81 std::string
code()
const;
84 std::string
name()
const;
109 {
return str << obj.
code(); }
119 return( lhs == rhs.
code() );
123 return( lhs.
code() == rhs );
128 return( !
operator==( lhs, rhs ) );
132 return( !
operator==( lhs, rhs ) );
136 return( !
operator==( lhs, rhs ) );
144 namespace std {
namespace tr1 {
149 {
return hash<std::string>()(__s.code()); }
163 #endif // ZYPP_LOCALE_H
static const Locale noCode
No or empty code.
RW_pointer< Impl > _pimpl
Pointer to implementation.
const CountryCode & country() const
bool operator==(const std::string &lhs, const Locale &rhs)
Access to the sat-pools string space.
size_t operator()(const ::zypp::Locale &__s) const
friend std::ostream & operator<<(std::ostream &str, const Locale &obj)
Locale fallback() const
Return a fallback locale for this locale, when giving up, returns empty Locale()
std::tr1::unordered_set< Locale > LocaleSet
std::string name() const
Return the name made of language and country name.
std::ostream & operator<<(std::ostream &str, const Locale &obj)
bool operator!=(const std::string &lhs, const Locale &rhs)
std::string code() const
Return the locale code.
bool operator==(const Locale &lhs, const std::string &rhs)
Wrapper for const correct access via Smart pointer types.
const LanguageCode & language() const
bool operator!=(const Locale &lhs, const Locale &rhs)
static Locale bestMatch(const LocaleSet &avLocales_r, const Locale &requested_r=Locale())
Return the best match for Locale requested_r within the available avLocales_r.
bool operator!=(const Locale &lhs, const std::string &rhs)
Language codes (iso639_2/iso639_1).
bool operator==(const Locale &lhs, const Locale &rhs)
Comparison based on string value.
Country codes (iso3166-1-alpha-2).