GemaLuaCoreLib
The GeMA Lua Core library
Public Member Functions | Private Attributes | List of all members
GmLuaTask Class Reference

A Thread task that is responsible for calling a Lua function that gets as parameters a single parameter with a per task value and a set of additional parameters that are common to all tasks. More...

#include <gmLuaTask.h>

Inheritance diagram for GmLuaTask:
Inheritance graph
[legend]
Collaboration diagram for GmLuaTask:
Collaboration graph
[legend]

Public Member Functions

 GmLuaTask (const QString &fname, const QVariant &taskPars, const QVariantList &extraPars, const GmLogCategory &logger)
 Constructor. More...
 
virtual GmThreadTaskResult run (const GmThread *thread)
 The main thread function, responsible for calling the Lua function.
 
- Public Member Functions inherited from GmThreadTask
int taskIndex () const
 
void setTaskIndex (int index)
 

Private Attributes

const QString_fname
 The name of the function to be called.
 
const QVariant_taskPars
 The set of task parameters.
 
const QVariantList & _extraPars
 The set of extra parameters, common to all tasks.
 
const GmLogCategory_logger
 A logger for error messages.
 

Detailed Description

A Thread task that is responsible for calling a Lua function that gets as parameters a single parameter with a per task value and a set of additional parameters that are common to all tasks.

Constructor & Destructor Documentation

◆ GmLuaTask()

GmLuaTask::GmLuaTask ( const QString fname,
const QVariant taskPars,
const QVariantList &  extraPars,
const GmLogCategory logger 
)

Constructor.

Parameters
fnameThe name of the function to be called
taskParsA variant, without any Lua references, with the per task parameter.

Can be a QVariantList or a QVariantMap and is usually the result of a call to LuaEnv::clearReferences()

Parameters
extraParsA list with the set of extra parameters, global to all tasks. Like in taskPars, each list entry is a variant without any Lua references.
loggerA logger that can be used to report errors.

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