LuaConfig¶
-
class
rlogic
::
LuaConfig
¶ Holds configuration settings for Lua script and module creation. Can be default-constructed, moved and copied.
Public Functions
-
bool
addDependency
(std::string_view aliasName, const LuaModule &moduleInstance)¶ Adds a rlogic::LuaModule as a dependency to be added when this config is used for script or module creation. The
aliasName
can be any valid Lua label which must obey following rules:can’t use the same label twice in the same LuaConfig object
can’t use standard module names (math, string etc.)
The
moduleInstance
provided can be any module. You can’t reference modules from different rlogic::LogicEngine instances and the referenced modules must be from the same instance on which the config is used for script creation.- Return
true if the dependency was added successfully, false otherwise In case of an error, check the logs.
- Parameters
aliasName
: the alias name under which the dependency will be mapped into the parent script/modulemoduleInstance
: the dependency module to map
-
bool
addStandardModuleDependency
(EStandardModule stdModule)¶ Adds a standard module dependency. The module is mapped under a name as documented in rlogic::EStandardModule.
- Return
true if the standard module was added successfully, false otherwise In case of an error, check the logs.
- Parameters
stdModule
: the standard module which will be mapped into the parent script/module
-
~LuaConfig
() noexcept¶ Destructor of LuaConfig
-
LuaConfig
(const LuaConfig &other)¶ Copy Constructor of LuaConfig
- Parameters
other
: the other LuaConfig to copy from
-
LuaConfig
(LuaConfig &&other) noexcept¶ Move Constructor of LuaConfig
- Parameters
other
: the other LuaConfig to move from
Public Members
-
std::unique_ptr<internal::LuaConfigImpl>
m_impl
¶ Implementation detail of LuaConfig
-
bool