Class endstone::Registry::Type¶
ClassList > endstone > Registry > Type
CRTP base for registry-backed types identified by an Identifier .More...
#include <endstone/registry.h>
Inherited by the following classes: endstone::ActorType, endstone::BlockType, endstone::Enchantment, endstone::ItemType
Public Types¶
| Type | Name |
|---|---|
| typedef Identifier< T > | Id |
Public Functions¶
| Type | Name |
|---|---|
| virtual Id | getId () const = 0 Return the identifier of this object. |
| virtual std::string | getTranslationKey () const = 0 Get the translation key, suitable for use in a translation component. |
| operator Id () const |
|
| bool | operator!= (const Id & other) const |
| bool | operator!= (const T & other) const |
| bool | operator== (const Id & other) const |
| bool | operator== (const T & other) const |
| virtual | ~Type () = default |
Public Static Functions¶
| Type | Name |
|---|---|
| const T * | get (Id id) Look up a registry entry by identifier. |
Detailed Description¶
Provides getId(), getTranslationKey() pure virtual declarations, comparison operators, implicit conversion to Id, and a static get() method.
Public Types Documentation¶
typedef Id¶
Public Functions Documentation¶
function getId¶
Return the identifier of this object.
Returns:
this object's identifier
function getTranslationKey¶
Get the translation key, suitable for use in a translation component.
Returns:
the translation key
function operator Id¶
function operator!=¶
function operator!=¶
function operator==¶
function operator==¶
function ~Type¶
Public Static Functions Documentation¶
function get¶
Look up a registry entry by identifier.
Parameters:
idIdentifier to look up.
Returns:
Pointer to the entry, or nullptr if not found.
The documentation for this class was generated from the following file include/endstone/registry.h