![]() |
GemaLuaCoreLib
The GeMA Lua Core library
|
A task function object responsible for calling a Lua function that gets as parameters an iterator for the given node data set plus any extra parameters common to all tasks. More...
#include <gmLuaTask.h>
Public Member Functions | |
GmLuaNodeTask (const QString &fname, const QVariantList &extraPars, const GmLogCategory &logger) | |
Constructor. More... | |
GmThreadTaskResult | operator() (GmNodeTaskDataSet *dataSet, const GmThread *thread) |
The function called in each thread to process nodes in the given data set. | |
Static Private Member Functions | |
static int | iteratorClosure (lua_State *L) |
The iterator object function that gets called in the expression 'for node in nodeTask() do'. Returns the iterator function plus the dataSet that will be sent as a parameter to the iterator function. | |
static int | iteratorFunction (lua_State *L) |
The iterator function called to return node values. | |
Private Attributes | |
const QString & | _fname |
The name of the function to be called. | |
const QVariantList & | _extraPars |
The set of extra parameters, common to all tasks. | |
const GmLogCategory & | _logger |
A logger for error messages. | |
A task function object responsible for calling a Lua function that gets as parameters an iterator for the given node data set plus any extra parameters common to all tasks.
GmLuaNodeTask::GmLuaNodeTask | ( | const QString & | fname, |
const QVariantList & | extraPars, | ||
const GmLogCategory & | logger | ||
) |
Constructor.
fname | The name of the function to be called |
extraPars | A list with the set of extra parameters, global to all tasks. Each list entry is a variant without any Lua references. |
logger | A logger that can be used to report errors. |