|
libzypp
14.29.1
|
Mime type like 'type/subtype' classification of content.
More...
#include <ContentType.h>
Public Member Functions | |
| ContentType () | |
| Default ctor: empty. More... | |
| ContentType (const std::string &type_r) | |
Ctor taking "type[/subtype]" More... | |
| ContentType (const std::string &type_r, const std::string &subtype_r) | |
| Ctor taking type and subtype. More... | |
| const std::string & | type () const |
| Get type. More... | |
| void | type (const std::string &type_r) |
| Set type. More... | |
| const std::string & | subtype () const |
| Get subtype. More... | |
| void | subtype (const std::string &subtype_r) |
| Set subtype. More... | |
| bool | empty () const |
| Whether type and subtype are empty. More... | |
| bool | emptyType () const |
| Whether type is empty. More... | |
| bool | emptySubtype () const |
| Whether subtype is empty. More... | |
| operator bool () const | |
| Validate object in a boolean context: !empty. More... | |
| std::string | asString () const |
String representation "type[/subtype]" More... | |
Private Member Functions | |
| void | testAndSet (std::string &var_r, const std::string &val_r) |
Private Attributes | |
| std::string | _type |
| std::string | _subtype |
Related Functions | |
(Note that these are not member functions.) | |
| std::ostream & | operator<< (std::ostream &str, const ContentType &obj) |
| bool | operator== (const ContentType &lhs, const ContentType &rhs) |
| bool | operator!= (const ContentType &lhs, const ContentType &rhs) |
| bool | operator< (const ContentType &lhs, const ContentType &rhs) |
| bool | operator<= (const ContentType &lhs, const ContentType &rhs) |
| bool | operator> (const ContentType &lhs, const ContentType &rhs) |
| bool | operator>= (const ContentType &lhs, const ContentType &rhs) |
Mime type like 'type/subtype' classification of content.
Used e.g. in callback::UserData to describe the kind of user data passed as void* to a callback. Neither type nor subtype may contain a '/'.
Definition at line 28 of file ContentType.h.
|
inline |
Default ctor: empty.
Definition at line 32 of file ContentType.h.
|
inlineexplicit |
Ctor taking "type[/subtype]"
| std::invalid_argument | if string is malformed |
Definition at line 38 of file ContentType.h.
|
inline |
Ctor taking type and subtype.
| std::invalid_argument | if string is malformed |
Definition at line 55 of file ContentType.h.
|
inline |
Get type.
Definition at line 63 of file ContentType.h.
|
inline |
Set type.
| std::invalid_argument | if string is malformed |
Definition at line 69 of file ContentType.h.
|
inline |
Get subtype.
Definition at line 73 of file ContentType.h.
|
inline |
Set subtype.
| std::invalid_argument | if string is malformed |
Definition at line 79 of file ContentType.h.
|
inline |
Whether type and subtype are empty.
Definition at line 84 of file ContentType.h.
|
inline |
Whether type is empty.
Definition at line 87 of file ContentType.h.
|
inline |
Whether subtype is empty.
Definition at line 90 of file ContentType.h.
|
inlineexplicit |
Validate object in a boolean context: !empty.
Definition at line 94 of file ContentType.h.
|
inline |
String representation "type[/subtype]"
Definition at line 98 of file ContentType.h.
|
inlineprivate |
Definition at line 102 of file ContentType.h.
|
related |
Stream output
Definition at line 114 of file ContentType.h.
|
related |
Definition at line 118 of file ContentType.h.
|
related |
Definition at line 122 of file ContentType.h.
|
related |
Definition at line 126 of file ContentType.h.
|
related |
Definition at line 130 of file ContentType.h.
|
related |
Definition at line 134 of file ContentType.h.
|
related |
Definition at line 138 of file ContentType.h.
|
private |
Definition at line 109 of file ContentType.h.
|
private |
Definition at line 110 of file ContentType.h.