#include <LanguageCode.h>
Public Member Functions | |
| LanguageCode () | |
| Default ctor. | |
| LanguageCode (const std::string &code_r) | |
| Ctor taking a string. | |
| ~LanguageCode () | |
| Dtor. | |
| std::string | code () const |
| Return the language code. | |
| std::string | name () const |
| Return the language name; if not available the language code. | |
| bool | hasCode () const |
*this != noCode. | |
Static Public Attributes | |
LanguageCode constants. | |
| static const LanguageCode | noCode |
| No or empty code. | |
Private Attributes | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const LanguageCode &obj) |
| Stream output. | |
Related Functions | |
| (Note that these are not member functions.) | |
| template<> | |
| bool | operator() (const zypp::LanguageCode &lhs, const zypp::LanguageCode &rhs) const |
| Default order for std::container based on code string value. | |
| bool | operator== (const LanguageCode &lhs, const LanguageCode &rhs) |
| Comparison based on string value. | |
| bool | operator== (const std::string &lhs, const LanguageCode &rhs) |
| bool | operator== (const LanguageCode &lhs, const std::string &rhs) |
| bool | operator!= (const LanguageCode &lhs, const LanguageCode &rhs) |
| bool | operator!= (const std::string &lhs, const LanguageCode &rhs) |
| bool | operator!= (const LanguageCode &lhs, const std::string &rhs) |
Classes | |
| struct | Impl |
| LanguageCode implementation. More... | |
In fact the class will not prevent to use a non iso language code. Just a warning will appear in the log.
Definition at line 37 of file LanguageCode.h.
| zypp::LanguageCode::LanguageCode | ( | ) |
| zypp::LanguageCode::LanguageCode | ( | const std::string & | code_r | ) | [explicit] |
| zypp::LanguageCode::~LanguageCode | ( | ) |
| std::string zypp::LanguageCode::code | ( | ) | const |
Return the language code.
Definition at line 207 of file LanguageCode.cc.
References _pimpl.
Referenced by zypp::Locale::Impl::code(), operator()(), and operator==().
| std::string zypp::LanguageCode::name | ( | ) | const |
Return the language name; if not available the language code.
Definition at line 215 of file LanguageCode.cc.
References _pimpl.
Referenced by zypp::Locale::Impl::name().
| bool zypp::LanguageCode::hasCode | ( | ) | const [inline] |
*this != noCode.
Definition at line 71 of file LanguageCode.h.
References noCode.
Referenced by zypp::Locale::Impl::fallback().
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const LanguageCode & | obj | |||
| ) | [friend] |
| bool operator== | ( | const LanguageCode & | lhs, | |
| const LanguageCode & | rhs | |||
| ) | [related] |
| bool operator== | ( | const std::string & | lhs, | |
| const LanguageCode & | rhs | |||
| ) | [related] |
| bool operator== | ( | const LanguageCode & | lhs, | |
| const std::string & | rhs | |||
| ) | [related] |
| bool operator!= | ( | const LanguageCode & | lhs, | |
| const LanguageCode & | rhs | |||
| ) | [related] |
Definition at line 100 of file LanguageCode.h.
| bool operator!= | ( | const std::string & | lhs, | |
| const LanguageCode & | rhs | |||
| ) | [related] |
Definition at line 104 of file LanguageCode.h.
| bool operator!= | ( | const LanguageCode & | lhs, | |
| const std::string & | rhs | |||
| ) | [related] |
Definition at line 108 of file LanguageCode.h.
| bool operator() | ( | const zypp::LanguageCode & | lhs, | |
| const zypp::LanguageCode & | rhs | |||
| ) | const [related] |
Default order for std::container based on code string value.
Definition at line 122 of file LanguageCode.h.
References code().
const LanguageCode zypp::LanguageCode::noCode [static] |
RW_pointer<Impl> zypp::LanguageCode::_pimpl [private] |
1.5.3