Mime type like 'type/subtype'
classification of content.
More...
#include <zypp/ContentType.h>
|
| ContentType () |
| Default ctor: empty.
|
| ContentType (std::string type_r) |
| Ctor taking "type[/subtype]"
|
| ContentType (std::string type_r, std::string subtype_r) |
| Ctor taking type and subtype.
|
const std::string & | type () const |
| Get type.
|
void | type (std::string type_r) |
| Set type.
|
const std::string & | subtype () const |
| Get subtype.
|
void | subtype (std::string subtype_r) |
| Set subtype.
|
bool | empty () const |
| Whether type and subtype are empty.
|
bool | emptyType () const |
| Whether type is empty.
|
bool | emptySubtype () const |
| Whether subtype is empty.
|
| operator bool () const |
| Validate object in a boolean context: !empty.
|
std::string | asString () const |
| String representation "type[/subtype]"
|
|
void | testAndSet (std::string &var_r, std::string val_r) |
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 29 of file ContentType.h.
◆ ContentType() [1/3]
zypp::ContentType::ContentType |
( |
| ) |
|
|
inline |
◆ ContentType() [2/3]
zypp::ContentType::ContentType |
( |
std::string | type_r | ) |
|
|
inlineexplicit |
Ctor taking "type[/subtype]"
- Exceptions
-
std::invalid_argument | if string is malformed |
Definition at line 39 of file ContentType.h.
◆ ContentType() [3/3]
zypp::ContentType::ContentType |
( |
std::string | type_r, |
|
|
std::string | subtype_r ) |
|
inline |
Ctor taking type and subtype.
- Exceptions
-
std::invalid_argument | if string is malformed |
Definition at line 53 of file ContentType.h.
◆ type() [1/2]
const std::string & zypp::ContentType::type |
( |
| ) |
const |
|
inline |
◆ type() [2/2]
void zypp::ContentType::type |
( |
std::string | type_r | ) |
|
|
inline |
Set type.
- Exceptions
-
std::invalid_argument | if string is malformed |
Definition at line 67 of file ContentType.h.
◆ subtype() [1/2]
const std::string & zypp::ContentType::subtype |
( |
| ) |
const |
|
inline |
◆ subtype() [2/2]
void zypp::ContentType::subtype |
( |
std::string | subtype_r | ) |
|
|
inline |
Set subtype.
- Exceptions
-
std::invalid_argument | if string is malformed |
Definition at line 77 of file ContentType.h.
◆ empty()
bool zypp::ContentType::empty |
( |
| ) |
const |
|
inline |
Whether type and subtype are empty.
Definition at line 82 of file ContentType.h.
◆ emptyType()
bool zypp::ContentType::emptyType |
( |
| ) |
const |
|
inline |
◆ emptySubtype()
bool zypp::ContentType::emptySubtype |
( |
| ) |
const |
|
inline |
◆ operator bool()
zypp::ContentType::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Validate object in a boolean context: !empty.
Definition at line 92 of file ContentType.h.
◆ asString()
std::string zypp::ContentType::asString |
( |
| ) |
const |
|
inline |
String representation "type[/subtype]"
Definition at line 96 of file ContentType.h.
◆ testAndSet()
void zypp::ContentType::testAndSet |
( |
std::string & | var_r, |
|
|
std::string | val_r ) |
|
inlineprivate |
◆ operator<<()
std::ostream & operator<< |
( |
std::ostream & | str, |
|
|
const ContentType & | obj ) |
|
related |
◆ operator==()
◆ operator!=()
◆ operator<()
◆ operator<=()
◆ operator>()
◆ operator>=()
◆ _type
std::string zypp::ContentType::_type |
|
private |
◆ _subtype
std::string zypp::ContentType::_subtype |
|
private |
The documentation for this class was generated from the following file: