The managed class is the base class for various types that can be stored in a cache that are identified by a dpp::snowflake id. More...
#include "managed.h"
Public Member Functions | |
managed ()=default | |
Constructor, initialises id to 0. More... | |
managed (const managed &rhs)=default | |
Copy constructor. More... | |
managed (const snowflake nid) | |
Constructor, initialises ID. More... | |
managed (managed &&rhs)=default | |
Move constructor. More... | |
virtual | ~managed ()=default |
Destroy the managed object. More... | |
constexpr double | get_creation_time () const noexcept |
Get the creation time of this object according to Discord. More... | |
constexpr bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
managed & | operator= (const managed &rhs)=default |
Copy assignment operator. More... | |
managed & | operator= (managed &&rhs)=default |
Move assignment operator. More... | |
constexpr bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
Public Attributes | |
snowflake | id = {} |
Unique ID of object set by Discord. More... | |
The managed class is the base class for various types that can be stored in a cache that are identified by a dpp::snowflake id.
|
default |
Constructor, initialises id to 0.
|
inline |
Constructor, initialises ID.
nid | ID to set |
|
default |
Copy constructor.
rhs | Object to copy |
|
default |
Move constructor.
Effectively equivalent to copy constructor
rhs | Object to move from |
|
virtualdefault |
Destroy the managed object.
|
inlineconstexprnoexcept |
Get the creation time of this object according to Discord.
|
inlineconstexprnoexcept |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
Copy assignment operator.
rhs | Object to copy |
Move assignment operator.
rhs | Object to move from |
|
inlineconstexprnoexcept |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
snowflake dpp::managed::id = {} |
Unique ID of object set by Discord.
This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.
Referenced by dpp::poll::add_answer(), dpp::cluster::create_webhook(), dpp::cluster::current_user_join_thread(), dpp::invite::fill_from_json_impl(), dpp::command_permission::fill_from_json_impl(), dpp::interaction::get_resolved_role(), dpp::interaction::get_resolved_user(), dpp::cluster::global_bulk_command_create(), dpp::cluster::global_bulk_command_delete(), dpp::cluster::global_command_delete(), dpp::cluster::global_command_edit(), dpp::cluster::guild_ban_delete(), dpp::cluster::guild_command_create(), dpp::cluster::guild_command_edit_permissions(), dpp::cluster::guild_get_integrations(), dpp::events::guild_member_update::handle(), dpp::events::guild_role_create::handle(), dpp::events::channel_create::handle(), dpp::events::voice_state_update::handle(), dpp::discord_voice_client::handle_frame(), main(), dpp::component::set_disabled(), and dpp::select_option::set_label().