![]() |
D++ (DPP)
C++ Discord API Bot Library
|
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>
Inheritance diagram for dpp::managed:
Collaboration diagram for dpp::managed:Public Member Functions | |
| managed ()=default | |
| Constructor, initialises id to 0. | |
| managed (const managed &rhs)=default | |
| Copy constructor. | |
| managed (const snowflake nid) | |
| Constructor, initialises ID. | |
| managed (managed &&rhs)=default | |
| Move constructor. | |
| virtual | ~managed ()=default |
| Destroy the managed object. | |
| constexpr double | get_creation_time () const noexcept |
| Get the creation time of this object according to Discord. | |
| constexpr bool | operator!= (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. | |
| managed & | operator= (const managed &rhs)=default |
| Copy assignment operator. | |
| managed & | operator= (managed &&rhs)=default |
| Move assignment operator. | |
| constexpr bool | operator== (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. | |
Public Attributes | |
| snowflake | 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. | |
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.
Constructor, initialises ID.
| nid | ID to set |
|
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.
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 |
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.