Toast Engine
Loading...
Searching...
No Matches
scripting::NodeProxy Class Reference

Public Member Functions

 NodeProxy (toast::Box< toast::Node > box) noexcept
auto box () noexcept -> toast::Box< toast::Node > &
auto box () const noexcept -> const toast::Box< toast::Node > &
auto exists () const noexcept -> bool
auto find (const std::string &query, lua_State *l) -> luabridge::LuaRef
auto search (const std::string &query) -> std::vector< NodeProxy >
auto parent (lua_State *l) -> luabridge::LuaRef
auto root (lua_State *l) -> luabridge::LuaRef
auto searchType (const std::string &type, lua_State *l) -> std::vector< NodeProxy >
auto searchType (const TypeMarker &type, lua_State *l) -> std::vector< NodeProxy >
auto getChildren (lua_State *l) -> std::vector< NodeProxy >
auto getChildren (const std::string &type, lua_State *l) -> std::vector< NodeProxy >
auto getChildren (const TypeMarker &type, lua_State *l) -> std::vector< NodeProxy >
auto create (const std::string &type, lua_State *l) -> luabridge::LuaRef
void addDependsOn (const NodeProxy &other)
void interactsWith (const NodeProxy &other)
auto name () const -> std::string
auto uid () const -> uint64_t
auto call (const std::string &fn_name, lua_State *l) -> luabridge::LuaRef
auto hasField (std::string_view key) const noexcept -> bool

Member Function Documentation

◆ call()

auto scripting::NodeProxy::call ( const std::string & fn_name,
lua_State * l ) -> luabridge::LuaRef

Invokes the named reflected C++ method and fans out to any same-named Lua function on the node's ScriptRuntime

◆ hasField()

auto scripting::NodeProxy::hasField ( std::string_view key) const -> bool
nodiscardnoexcept
Returns
true if the wrapped node has a reflected field with the given name

The documentation for this class was generated from the following files:
  • engine/src/toast/scripting/node_proxy.hpp
  • engine/src/toast/scripting/node_proxy.cpp