#include <Locale.h>
List of all members.
Classes |
struct | Impl |
| Locale implementation. More...
|
Public Member Functions |
| Locale () |
| Default ctor.
|
| Locale (IdString code_r) |
| Ctor taking a string.
|
| Locale (const std::string &code_r) |
| Locale (const char *code_r) |
| 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 Member Functions |
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 .
|
Static Public Attributes |
|
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) |
Related Functions |
(Note that these are not member functions.)
|
std::ostream & | operator<< (std::ostream &str, const Locale &obj) |
template<> |
bool | operator() (const zypp::Locale &lhs, const zypp::Locale &rhs) const |
|
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) |
Detailed Description
- Todo:
- migrate to IdString
Definition at line 38 of file Locale.h.
Constructor & Destructor Documentation
zypp::Locale::Locale |
( |
IdString |
code_r | ) |
[explicit] |
Ctor taking a string.
Definition at line 146 of file Locale.cc.
zypp::Locale::Locale |
( |
const std::string & |
code_r | ) |
[explicit] |
zypp::Locale::Locale |
( |
const char * |
code_r | ) |
[explicit] |
zypp::Locale::~Locale |
( |
| ) |
|
Member Function Documentation
std::string zypp::Locale::code |
( |
| ) |
const |
Return the locale code.
Definition at line 207 of file Locale.cc.
std::string zypp::Locale::name |
( |
| ) |
const |
Return the name made of language and country name.
Definition at line 215 of file Locale.cc.
Locale zypp::Locale::fallback |
( |
| ) |
const |
Return a fallback locale for this locale, when giving up, returns empty Locale()
Definition at line 223 of file Locale.cc.
Friends And Related Function Documentation
std::ostream& operator<< |
( |
std::ostream & |
str, |
|
|
const Locale & |
obj |
|
) |
| [friend] |
std::ostream & operator<< |
( |
std::ostream & |
str, |
|
|
const Locale & |
obj |
|
) |
| [related] |
bool operator== |
( |
const Locale & |
lhs, |
|
|
const Locale & |
rhs |
|
) |
| [related] |
Comparison based on string value.
Definition at line 114 of file Locale.h.
bool operator== |
( |
const std::string & |
lhs, |
|
|
const Locale & |
rhs |
|
) |
| [related] |
bool operator== |
( |
const Locale & |
lhs, |
|
|
const std::string & |
rhs |
|
) |
| [related] |
bool operator!= |
( |
const Locale & |
lhs, |
|
|
const Locale & |
rhs |
|
) |
| [related] |
bool operator!= |
( |
const std::string & |
lhs, |
|
|
const Locale & |
rhs |
|
) |
| [related] |
bool operator!= |
( |
const Locale & |
lhs, |
|
|
const std::string & |
rhs |
|
) |
| [related] |
Default order for std::container based on code string value.
Definition at line 158 of file Locale.h.
Member Data Documentation
No or empty code.
Definition at line 71 of file Locale.h.
Pointer to implementation.
Definition at line 103 of file Locale.h.
The documentation for this class was generated from the following files: