11 #ifndef ZYPP_CONTENTTYPE_H
12 #define ZYPP_CONTENTTYPE_H
42 if ( pos != std::string::npos )
61 const std::string &
type()
const
67 void type( std::string type_r )
68 {
_type = std::move(type_r); }
86 {
return _type.empty(); }
92 explicit operator bool ()
const
102 if ( val_r.find_first_of(
"/ \t\r\n" ) != std::string::npos )
103 throw std::invalid_argument(
"ContentType: illegal char in '" + val_r +
"'" );
104 var_r = std::move(val_r);
121 {
return !( lhs == rhs ); }
125 {
int cmp = lhs.
type().compare( rhs.
type() );
return cmp < 0 || ( cmp == 0 && lhs.
subtype() < rhs.
subtype() ); }
129 {
return lhs < rhs || lhs == rhs; }
133 {
return !( lhs <= rhs ); }
137 {
return !( lhs < rhs ); }
142 #endif // ZYPP_CONTENTTYPE_H