GemaLuaCoreLib
The GeMA Lua Core library
Loading...
Searching...
No Matches
GmLuaNodeTask Class Reference

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>

Collaboration diagram for GmLuaNodeTask:

Public Member Functions

 GmLuaNodeTask (const QString &fname, const QVariantList &extraPars, const GmLogCategory &logger)
 Constructor.
 
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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GmLuaNodeTask()

GmLuaNodeTask::GmLuaNodeTask ( const QString & fname,
const QVariantList & extraPars,
const GmLogCategory & logger )

Constructor.

Parameters
fnameThe name of the function to be called
extraParsA list with the set of extra parameters, global to all tasks. 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: