12 #ifndef ZYPP_LANGUAGECODE_H
13 #define ZYPP_LANGUAGECODE_H
25 inline bool operator==(
const LanguageCode & lhs,
const LanguageCode & rhs );
26 inline bool operator!=(
const LanguageCode & lhs,
const LanguageCode & rhs );
65 std::string
code()
const;
68 std::string
name()
const;
72 {
return *
this !=
noCode; }
82 {
return str << obj.
code(); }
92 return( lhs == rhs.
code() );
96 return( lhs.
code() == rhs );
101 return( !
operator==( lhs, rhs ) );
105 return( !
operator==( lhs, rhs ) );
109 return( !
operator==( lhs, rhs ) );
127 #endif // ZYPP_LANGUAGECODE_H
static const LanguageCode noCode
No or empty code.
LanguageCode()
Default ctor.
bool operator!=(const CountryCode &lhs, const CountryCode &rhs)
std::string code() const
Return the language code.
bool operator!=(const LanguageCode &lhs, const LanguageCode &rhs)
bool operator!=(const LanguageCode &lhs, const std::string &rhs)
std::string name() const
Return the language name; if not available the language code.
bool operator==(const std::string &lhs, const LanguageCode &rhs)
std::ostream & operator<<(std::ostream &str, const LanguageCode &obj)
bool operator!=(const std::string &lhs, const LanguageCode &rhs)
RW_pointer< Impl > _pimpl
Pointer to implementation.
bool operator==(const StrMatcher &lhs, const StrMatcher &rhs)
bool hasCode() const
*this != noCode.
friend std::ostream & operator<<(std::ostream &str, const LanguageCode &obj)
Wrapper for const correct access via Smart pointer types.
bool operator==(const LanguageCode &lhs, const std::string &rhs)
Language codes (iso639_2/iso639_1).
LanguageCode implementation.
bool operator==(const LanguageCode &lhs, const LanguageCode &rhs)
Comparison based on string value.