Store a 128 bit icon hash (profile picture, server icon etc) as a 128 bit binary value made of two uint64_t. Has a constructor to build one from a string, and a method to fetch the value back in string form.
More...
#include <discord.h>
Store a 128 bit icon hash (profile picture, server icon etc) as a 128 bit binary value made of two uint64_t. Has a constructor to build one from a string, and a method to fetch the value back in string form.
◆ iconhash() [1/2]
dpp::utility::iconhash::iconhash |
( |
| ) |
|
Construct a new iconcash object.
◆ iconhash() [2/2]
dpp::utility::iconhash::iconhash |
( |
const std::string & |
hash | ) |
|
Construct a new iconhash object.
- Parameters
-
hash | String hash to construct from. Must contain a 32 character hex string. |
- Exceptions
-
std::length_error | if the provided string is not exactly 32 characters long. |
◆ operator=()
iconhash & dpp::utility::iconhash::operator= |
( |
const std::string & |
assignment | ) |
|
Assign from std::string.
- Parameters
-
assignment | string to assign from. |
- Exceptions
-
std::length_error | if the provided string is not exactly 32 characters long. |
◆ set()
void dpp::utility::iconhash::set |
( |
const std::string & |
hash | ) |
|
Change value of iconhash object.
- Parameters
-
hash | String hash to change to. Must contain a 32 character hex string. |
- Exceptions
-
std::length_error | if the provided string is not exactly 32 characters long. |
◆ to_string()
std::string dpp::utility::iconhash::to_string |
( |
| ) |
const |
Convert iconhash back to 32 character string value.
- Returns
- std::string Hash value
◆ first
uint64_t dpp::utility::iconhash::first |
◆ second
uint64_t dpp::utility::iconhash::second |