Kanzi 3.9.10
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.
 
MetaclassContainer getMetaclassesOverride () override
 Module::getMetaclassesOverride() implementation.
 
LuaInstancegetOrInitLua ()
 Initializes the Lua instance if it does not exist.
 
 LuaModule ()=default
 Constructor.
 
 ~LuaModule () override=default
 Destructor.
 
- 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.
 
virtual void registerMetadataOverride (ObjectFactory &)
 Registers the rest of the module metadata, such as loaders for types in the module.
 
void setDomain (Domain *domain)
 Sets the domain.
 

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.
 
static void registerModule (Domain *domain)
 Registers the Lua module to the current domain.
 

Protected Attributes

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

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.
 

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

◆ LuaModule()

kanzi::LuaModule::LuaModule ( )
explicitdefault

Constructor.

◆ ~LuaModule()

kanzi::LuaModule::~LuaModule ( )
overridedefault

Destructor.

Member Function Documentation

◆ get()

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.

◆ registerModule()

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.

◆ getOrInitLua()

LuaInstance & kanzi::LuaModule::getOrInitLua ( )

Initializes the Lua instance if it does not exist.

Returns
The Lua instance.

◆ freeLua()

void kanzi::LuaModule::freeLua ( )

Frees the Lua instance.

◆ getMetaclassesOverride()

MetaclassContainer kanzi::LuaModule::getMetaclassesOverride ( )
overridevirtual

Module::getMetaclassesOverride() implementation.

Reimplemented from kanzi::Module.

Member Data Documentation

◆ m_lua

LuaInstancePtr kanzi::LuaModule::m_lua
protected

The Lua instance.


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