12 #ifndef ZYPP_COUNTRYCODE_H
13 #define ZYPP_COUNTRYCODE_H
25 inline bool operator==(
const CountryCode & lhs,
const CountryCode & rhs );
26 inline bool operator!=(
const CountryCode & lhs,
const CountryCode & rhs );
66 std::string
code()
const;
69 std::string
name()
const;
73 {
return *
this !=
noCode; }
83 {
return str << obj.
code(); }
93 return( lhs == rhs.
code() );
97 return( lhs.
code() == rhs );
102 return( !
operator==( lhs, rhs ) );
106 return( !
operator==( lhs, rhs ) );
110 return( !
operator==( lhs, rhs ) );
128 #endif // ZYPP_COUNTRYCODE_H
bool operator!=(const CountryCode &lhs, const CountryCode &rhs)
bool operator!=(const std::string &lhs, const CountryCode &rhs)
RW_pointer< Impl > _pimpl
Pointer to implementation.
bool operator==(const std::string &lhs, const CountryCode &rhs)
friend std::ostream & operator<<(std::ostream &str, const CountryCode &obj)
CountryCode()
Default ctor.
std::ostream & operator<<(std::ostream &str, const CountryCode &obj)
bool operator==(const StrMatcher &lhs, const StrMatcher &rhs)
std::string name() const
Return the country name; if not available the country code.
bool operator==(const CountryCode &lhs, const CountryCode &rhs)
Comparison based on string value.
bool operator==(const CountryCode &lhs, const std::string &rhs)
bool hasCode() const
*this != noCode.
Wrapper for const correct access via Smart pointer types.
bool operator!=(const CountryCode &lhs, const CountryCode &rhs)
static const CountryCode noCode
No or empty code.
std::string code() const
Return the country code.
CountryCode implementation.
Country codes (iso3166-1-alpha-2).
bool operator!=(const CountryCode &lhs, const std::string &rhs)