Toast Engine
Loading...
Searching...
No Matches
toast::NodeRegistry Class Reference

Global registry mapping fully-qualified type names to NodeInfo pointers. More...

#include <reflect_node.hpp>

Static Public Member Functions

static void registerNode (const NodeInfo *info)
 Called by the generated registration function; inserts a type into the registry.
static auto reflect (std::string_view name) -> const NodeInfo *
 Looks up a Node type by its fully-qualified C++ name.
template<typename F>
static void forEachType (F &&fn)
 Calls fn(info) for every registered node type.

Detailed Description

Global registry mapping fully-qualified type names to NodeInfo pointers.

The singleton is populated by registerEngineTypes(), which is generated by refgen and called at engine startup. After startup the registry is read-only from user code.

Note
Do not call registerNode() directly; it is reserved for generated registration functions
See also
NodeInfo, registerEngineTypes()

Member Function Documentation

◆ reflect()

auto toast::NodeRegistry::reflect ( std::string_view name) -> const NodeInfo *
inlinestaticnodiscard

Looks up a Node type by its fully-qualified C++ name.

Parameters
nameFully-qualified class name, e.g. "toast::Node3D"
Returns
Pointer to the static NodeInfo, or nullptr if the type was not registered
Here is the caller graph for this function:

The documentation for this class was generated from the following files: