24 #ifndef _GEMA_SHARED_CODE_LOADER_H_ 25 #define _GEMA_SHARED_CODE_LOADER_H_ Auxiliary class responsible for loading shared code information from a Lua table.
Definition: gmSharedCodeLoader.h:37
bool loadFileCode(QString fileName, const QVector< QPair< int, int > > &blockList, QString &code)
Loads shared blocks / function definitions from the given file, appending the data to code....
Definition: gmSharedCodeLoader.cpp:213
const GmLogCategory & _logger
Reference to the logger object used to emmit messages.
Definition: gmSharedCodeLoader.h:54
QStringList readParameter(GmSharedCodeLoaderReadBuffer &b, QString line) const
Reads and returns the text for a function parameter list, either enclosed in () or {},...
Definition: gmSharedCodeLoader.cpp:360
GmSharedCodeLoader(const GmLogCategory &logger, GmSimulationData *simData, const QStringList &pluginDataAliases)
Constructor. Receives as a parameters the logger object that will be used to emmit messages,...
Definition: gmSharedCodeLoader.cpp:131
QString removeComments(QString line) const
Remove comments from the line. Only handles line comments (– ones), not block comments.
Definition: gmSharedCodeLoader.cpp:327
QStringList _implicitBlockNames
The list with names that implicitely start a shared block.
Definition: gmSharedCodeLoader.h:56
int findParPos(QString line, bool isImplicit) const
Finds the position in string where the SharedCodeEnd/NodeFunction/CellFunction/pluginObject tag ends ...
Definition: gmSharedCodeLoader.cpp:299
bool load(LuaTable &sharedCodeData)
Loads shared code block data from the Lua table received as a parameter.
Definition: gmSharedCodeLoader.cpp:163
GmSimulationData * _simData
Simulation data object.
Definition: gmSharedCodeLoader.h:55
An auxiliar class to implement a simple form of look ahead while reading file data.
Definition: gmSharedCodeLoader.cpp:43
QString removePrefix(QString line, bool isImplicit) const
Removes data from the line before the block start.
Definition: gmSharedCodeLoader.cpp:275
~GmSharedCodeLoader()
Destructor.
Definition: gmSharedCodeLoader.cpp:145