LuaInterface¶
-
class
rlogic
::
LuaInterface
: public rlogic::LogicNode¶ LuaInterface encapsulates forms an additional layer to a logic network (whole or its parts) and it exposes only relevant inputs to the user of that network. Those input variables can be used to represent scenes in an abstract way. LuaInterface instances are created by the rlogic::LogicEngine class.
A LuaInterface can be created from Lua source code which must fulfill same requirements as rlogic::LuaScript, except for the following:
A Lua interface contains only one global function: interface()
The interface() function takes only one parameter that represents both inputs and outputs, e.g., interface(INOUT_PARAMS)
Violating any of these requirements will result in errors, which can be obtained by calling rlogic::LogicEngine::getErrors(). for other than interface definition purposes, see rlogic::LuaModule and rlogic::LuaScript for details.
See also the full documentation at https://ramses-logic.readthedocs.io/en/latest/api.html for more details on Lua and its interaction with C++.
Public Functions
-
LuaInterface
(std::unique_ptr<internal::LuaInterfaceImpl> impl) noexcept¶ Constructor of LuaInterface. User is not supposed to call this - interface objects are created by other factory classes
- Parameters
impl
: implementation details of the interface
-
~LuaInterface
() noexcept override¶ Destructor of LuaInterface
-
LuaInterface
(const LuaInterface &other) = delete¶ Copy Constructor of LuaInterface is deleted because scripts are not supposed to be copied
- Parameters
other
: interface to copy from
-
LuaInterface
(LuaInterface &&other) = delete¶ Move Constructor of LuaInterface is deleted because scripts are not supposed to be moved
- Parameters
other
: interface to move from
-
LuaInterface &
operator=
(const LuaInterface &other) = delete¶ Assignment operator of LuaInterface is deleted because scripts are not supposed to be copied
- Parameters
other
: interface to assign from
-
LuaInterface &
operator=
(LuaInterface &&other) = delete¶ Move assignment operator of LuaInterface is deleted because scripts are not supposed to be moved
- Parameters
other
: interface to move from
Public Members
-
internal::LuaInterfaceImpl &
m_interface
¶ Implementation detail of LuaInterface