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

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.

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 operator()(), and operator==().

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.


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]

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.

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

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

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.


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::Language::installedInstance(), and zypp::solver::detail::QueueItemRequire::process().

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

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::Language::installedInstance(), and zypp::solver::detail::QueueItemRequire::process().


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 16:49:37 2006 for zypp by  doxygen 1.5.0