GemaLuaCoreLib
The GeMA Lua Core library
Classes | Namespaces | Functions
gmLuaTask.h File Reference

Declaration of the GmLuaTask family of classes. More...

#include "gmLuaEnv.h"
#include <gmTaskManager.h>
Include dependency graph for gmLuaTask.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GmLuaTask
 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...
 
class  GmLuaNodeTask
 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...
 
class  GmLuaCellTask
 A task function object responsible for calling a Lua function that gets as parameters an iterator for the given cell data set plus any extra parameters common to all tasks. More...
 

Namespaces

 GmLuaTaskUtils
 Aux functions used by several of the task classes.
 

Functions

bool GmLuaTaskUtils::pushParameter (LuaEnv *env, const QVariant &v)
 Pushes v on the stack. More...
 
bool GmLuaTaskUtils::setInTable (LuaTable &t, const QVariant &index, const QVariant &v)
 Aux function used by pushParameter() to set a field in a table (integer or string) to the value v, following the same rules as in pushParameter(). Can not use LuaTable::fromVariantMap() due to the differences in treatment for user data values.
 
GmThreadTaskResult GmLuaTaskUtils::callLuaTaskFunction (void *dataSet, const GmThread *thread, const QString &luaName, const QVariantList &extraPars, const GmLogCategory &logger, bool loggerIsUpvalue, int(*iteratorClosure)(lua_State *), const char *fname)
 Aux function used by the GmLuaXxxTask classes to call a Lua function sending as parameters an iterator over the given data set + any additional extra parameters.
 
template<class T >
void GmLuaTaskUtils::parseExecOptions (LuaEnv *env, int stackPos, T(*str2Strat)(QString), T defStrategy, const char *fname, int *ntasks, int *nworkers, T *strategy, QVector< int > &taskAffinity)
 Parses the contents of the options Lua table at stackPos, using the function str2Strat() function to transform strings to a strategy enum value. On errors, this function calls luaL_error() and doesn't returns. More...
 

Detailed Description

Declaration of the GmLuaTask family of classes.

Author
Carlos Augusto Teixeira Mendes
Date
july, 2018