24 #ifndef _GEMA_SIMULATION_LOADER_H_ 25 #define _GEMA_SIMULATION_LOADER_H_ 63 lua_State* state,
bool redirectPrint,
int tid);
82 bool redirectPrint,
int tid);
bool loadSharedBlocks(GmSimulationData *simData, LuaTable &globalTab)
Loads shared block code from the set of files containing shared blocks stored in the given Lua table.
Definition: gmSimulationLoader.cpp:859
static int translateDofilePath(lua_State *L)
Function called by the Lua script while executing a dofile() call to translate path strings.
Definition: gmSimulationLoader.cpp:727
GmPluginLoader * pluginLoader() const
Returns the plugin loader.
Definition: gmSimulationLoader.h:66
bool setupPlugins(QString pluginDirs)
Setup plugins, loading information from available options.
Definition: gmSimulationLoader.cpp:170
GmLogCategory _logger
The logger object used to emmit messages.
Definition: gmSimulationLoader.h:94
static int emmitSectionParsed(lua_State *L)
Function called by the Lua script to emmit a sectionParsed() signal.
Definition: gmSimulationLoader.cpp:700
Auxiliary class responsible for loading simulation information from a Lua File.
Definition: gmSimulationLoader.h:43
bool loadModelInfo(GmSimulationData *simData, LuaTable &globalTab)
Loads model data from the Lua table received as a parameter.
Definition: gmSimulationLoader.cpp:810
bool loadSharedEnvironments(GmSimulationData *simData, const QMap< QString, QString > &globalVars, bool redirectPrint, QList< LuaEnv * > &workerEnvList)
Similar to load(), this function creates and prepares the Lua environments needed by worker threads,...
Definition: gmSimulationLoader.cpp:354
void replaceDofileInEnv(LuaEnv &env, bool trackFiles, QString table="")
Utilitary function used to replace the dofile method inside the given environment so that it can tran...
Definition: gmSimulationLoader.cpp:101
bool loadSolutionInfo(GmSimulationData *simData, LuaTable &globalTab)
Loads solution data from the Lua table received as a parameter.
Definition: gmSimulationLoader.cpp:826
LuaEnv * prepareSimulationEnvironment(GmSimulationData *simData, QString simFile, const QMap< QString, QString > &globalVars, lua_State *state, bool redirectPrint, int tid)
Creates and prepares the Lua environment that will be used to load the simulation file / shared code ...
Definition: gmSimulationLoader.cpp:413
void sectionParsed(QString section, LuaTable &data)
Signal emmited whenever a model section has been parsed from the Lua file.
QString translatePath(QString path)
Utilitary function used to translate macros in a path, replacing them by the appropriate location.
Definition: gmSimulationLoader.cpp:158
bool load(GmSimulationData *simData, QString simFile, bool rsrcFile, LuaEnv *env)
Loads data defining the model to be simulated.
Definition: gmSimulationLoader.cpp:231
GmPath * _paths
Object storing information about relevant paths used in the simulation.
Definition: gmSimulationLoader.h:95
bool loadResultsInfo(GmSimulationData *simData, LuaTable &globalTab)
Loads results configuration data from the Lua table received as a parameter.
Definition: gmSimulationLoader.cpp:842
static QString translateScriptName(void *context, QString scriptName)
Callback called by the replaced dofile from LuaEnv to adjust the given script name for use in error m...
Definition: gmSimulationLoader.cpp:746
LuaEnv * loadSharedEnv(GmSimulationData *simData, const QMap< QString, QString > &globalVars, bool redirectPrint, int tid)
Worker function for loadSharedEnvironments(), creating the environment for a single thread.
Definition: gmSimulationLoader.cpp:595
bool loadSimulationInfo(GmSimulationData *simData, LuaTable &globalTab)
Loads simulation data from the Lua environment.
Definition: gmSimulationLoader.cpp:766
GmPluginLoader * _pluginLoader
Plugin loader.
Definition: gmSimulationLoader.h:96
GmSimulationLoader(GmPath *paths)
Constructor. Receives as a parameter the object used to control application paths.
Definition: gmSimulationLoader.cpp:70
~GmSimulationLoader()
Destructor.
Definition: gmSimulationLoader.cpp:81