Skip to content

Class endstone::IRegistry

ClassList > endstone > IRegistry

Type-erased base interface for registries. More...

  • #include <endstone/registry.h>

Inherited by the following classes: endstone::Registry

Public Functions

Type Name
virtual std::size_t size () const = 0
Gets the number of entries in this registry.
virtual ~IRegistry () = default

Protected Functions

Type Name
virtual void forEach0 (std::function< bool(const void *)> func) const = 0
virtual const void * get0 (std::string_view id) noexcept const = 0
virtual const std::type_info & getTypeId () noexcept const = 0

Detailed Description

Allows registries of any element type to be handled uniformly without knowing the concrete element type. Prefer the typed Registry interface in plugin code.

Public Functions Documentation

function size

Gets the number of entries in this registry.

virtual std::size_t endstone::IRegistry::size () const = 0

Returns:

the entry count


function ~IRegistry

virtual endstone::IRegistry::~IRegistry () = default

Protected Functions Documentation

function forEach0

virtual void endstone::IRegistry::forEach0 (
    std::function< bool ( const  void *)> func
) const = 0

function get0

virtual const  void * endstone::IRegistry::get0 (
    std::string_view id
) noexcept const = 0

function getTypeId

virtual const std::type_info & endstone::IRegistry::getTypeId () noexcept const = 0

Friends Documentation

friend PyRegistry

class endstone::IRegistry::PyRegistry (
    python::PyRegistry
) 


The documentation for this class was generated from the following file include/endstone/registry.h