![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Wrapper class around a variant for either iconhash or image, for API objects that have one or the other (generally iconhash when receiving, image when uploading an image) More...
#include <utility.h>
Collaboration diagram for dpp::utility::icon:Public Member Functions | |
| iconhash & | as_iconhash () & |
| Get as icon hash. More... | |
| iconhash && | as_iconhash () && |
| Get as icon hash. More... | |
| const iconhash & | as_iconhash () const & |
| Get as icon hash. More... | |
| image_data & | as_image_data () & |
| Get as image data. More... | |
| image_data && | as_image_data () && |
| Get as image. More... | |
| const image_data & | as_image_data () const & |
| Get as image. More... | |
| bool | is_iconhash () const |
| Check whether this icon is stored as an iconhash. More... | |
| bool | is_image_data () const |
| Check whether this icon is stored as an image. More... | |
| icon & | operator= (const iconhash &hash) |
| Assign to iconhash. More... | |
| icon & | operator= (const image_data &img) |
| Assign to image. More... | |
| icon & | operator= (iconhash &&hash) noexcept |
| Assign to iconhash. More... | |
| icon & | operator= (image_data &&img) noexcept |
| Assign to image. More... | |
Public Attributes | |
| std::variant< std::monostate, iconhash, image_data > | hash_or_data |
| Iconhash received or image data for upload. More... | |
Wrapper class around a variant for either iconhash or image, for API objects that have one or the other (generally iconhash when receiving, image when uploading an image)
| iconhash & dpp::utility::icon::as_iconhash | ( | ) | & |
Get as icon hash.
@warn The behavior is undefined if is_iconhash() == false
| iconhash && dpp::utility::icon::as_iconhash | ( | ) | && |
Get as icon hash.
@warn The behavior is undefined if is_iconhash() == false
| const iconhash & dpp::utility::icon::as_iconhash | ( | ) | const & |
Get as icon hash.
@warn The behavior is undefined if is_iconhash() == false
| image_data & dpp::utility::icon::as_image_data | ( | ) | & |
Get as image data.
@warn The behavior is undefined if is_image_data() == false
| image_data && dpp::utility::icon::as_image_data | ( | ) | && |
Get as image.
@warn The behavior is undefined if is_image_data() == false
| const image_data & dpp::utility::icon::as_image_data | ( | ) | const & |
Get as image.
@warn The behavior is undefined if is_image_data() == false
| bool dpp::utility::icon::is_iconhash | ( | ) | const |
Check whether this icon is stored as an iconhash.
| bool dpp::utility::icon::is_image_data | ( | ) | const |
Check whether this icon is stored as an image.
Assign to iconhash.
| hash | Iconhash |
| icon & dpp::utility::icon::operator= | ( | const image_data & | img | ) |
Assign to image.
| img | Image |
Assign to iconhash.
| hash | Iconhash |
|
noexcept |
Assign to image.
| img | Image |
| std::variant<std::monostate, iconhash, image_data> dpp::utility::icon::hash_or_data |
Iconhash received or image data for upload.