Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::LuaModule Class Reference

The Lua plugin enables you to program Kanzi applications using the Lua programming language. More...

#include <kanzi/lua/lua_module.hpp>

Inheritance diagram for kanzi::LuaModule:
[legend]

Public Member Functions

void freeLua ()
 Frees the Lua instance. More...
 
MetaclassContainer getMetaclassesOverride () override
 Module::getMetaclassesOverride() implementation. More...
 
LuaInstancegetOrInitLua ()
 Initializes the Lua instance if it does not exist. More...
 
 LuaModule ()=default
 Constructor. More...
 
 ~LuaModule () override=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::Plugin
 Plugin ()
 
- Public Member Functions inherited from kanzi::Module
virtual void destroy ()
 
 Module ()
 
virtual void registerDebugRenderingFunctions (DebugRenderRegistry &)
 Registers the debug rendering functions of the module. More...
 
virtual void registerMetadataOverride (ObjectFactory &)
 Registers the rest of the module metadata, such as loaders for types in the module. More...
 
void setDomain (Domain *domain)
 Sets the domain. More...
 

Static Public Member Functions

static LuaModuleget (Domain *domain)
 Returns the LuaModule loaded on the given domain or nullptr if the domain does not contain the module. More...
 
static void registerModule (Domain *domain)
 Registers the Lua module to the current domain. More...
 

Protected Attributes

LuaInstancePtr m_lua
 The Lua instance. More...
 
- Protected Attributes inherited from kanzi::Module
Domainm_domain
 The domain this module is registered to. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::Module
typedef vector< const Metaclass * > MetaclassContainer
 
typedef MetaclassContainer::iterator MetaclassIterator
 
- Protected Member Functions inherited from kanzi::Module
virtual ~Module ()=default
 Destructor. More...
 

Detailed Description

The Lua plugin enables you to program Kanzi applications using the Lua programming language.

The plugin contains the LuaInstance, which enables you to load and execute Lua scripts.

See also
LuaInstance
Since
Kanzi 3.9.9

Constructor & Destructor Documentation

kanzi::LuaModule::LuaModule ( )
explicitdefault

Constructor.

kanzi::LuaModule::~LuaModule ( )
overridedefault

Destructor.

Member Function Documentation

static LuaModule* kanzi::LuaModule::get ( Domain domain)
static

Returns the LuaModule loaded on the given domain or nullptr if the domain does not contain the module.

Parameters
domainThe domain.
Returns
The LuaModule loaded on the given domain or nullptr if the domain does not contain the module.
static void kanzi::LuaModule::registerModule ( Domain domain)
static

Registers the Lua module to the current domain.

Parameters
domainThe domain to which you want the Lua module to belong.
LuaInstance& kanzi::LuaModule::getOrInitLua ( )

Initializes the Lua instance if it does not exist.

Returns
The Lua instance.
void kanzi::LuaModule::freeLua ( )

Frees the Lua instance.

MetaclassContainer kanzi::LuaModule::getMetaclassesOverride ( )
overridevirtual

Module::getMetaclassesOverride() implementation.

Reimplemented from kanzi::Module.

Member Data Documentation

LuaInstancePtr kanzi::LuaModule::m_lua
protected

The Lua instance.


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