zypp::Locale Class Reference

#include <Locale.h>

List of all members.

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 LanguageCodelanguage () const
const CountryCodecountry () 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...


Detailed Description

Definition at line 31 of file Locale.h.


Constructor & Destructor Documentation

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]

Ctor taking a string.

Definition at line 145 of file Locale.cc.

zypp::Locale::Locale ( const LanguageCode language_r,
const CountryCode country_r = CountryCode() 
)

Ctor taking LanguageCode and optional CountryCode.

Definition at line 154 of file Locale.cc.

zypp::Locale::~Locale (  ) 

Dtor.

Definition at line 164 of file Locale.cc.


Member Function Documentation

const LanguageCode & zypp::Locale::language (  )  const

Definition at line 172 of file Locale.cc.

References _pimpl.

const CountryCode & zypp::Locale::country (  )  const

Definition at line 180 of file Locale.cc.

References _pimpl.

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().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Locale obj 
) [friend]

Stream output.

Definition at line 83 of file Locale.h.

bool operator== ( const Locale lhs,
const Locale rhs 
) [related]

Comparison based on string value.

Definition at line 89 of file Locale.h.

References code().

bool operator== ( const std::string &  lhs,
const Locale rhs 
) [related]

Definition at line 93 of file Locale.h.

References code().

bool operator== ( const Locale lhs,
const std::string &  rhs 
) [related]

Definition at line 97 of file Locale.h.

References code().

bool operator!= ( const Locale lhs,
const Locale rhs 
) [related]

Definition at line 102 of file Locale.h.

bool operator!= ( const std::string &  lhs,
const Locale rhs 
) [related]

Definition at line 106 of file Locale.h.

bool operator!= ( const Locale lhs,
const std::string &  rhs 
) [related]

Definition at line 110 of file Locale.h.

bool operator() ( const zypp::Locale lhs,
const zypp::Locale rhs 
) const [related]

Default order for std::container based on code string value.

Definition at line 124 of file Locale.h.

References code().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:15 2007 for libzypp by  doxygen 1.5.3