![]() |
GemaCoreLib
The GeMA Core library
|
Base interface class for Process type plugins. More...
#include <gmProcess.h>
Public Member Functions | |
GmProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
Constructor. More... | |
virtual | ~GmProcess () |
Virtual destructor. | |
virtual const char * | pluginCategory () const |
Returns the plugin category. | |
virtual bool | loadPrivateData (LuaTable &table) |
In general, processes dont have any configuration data on the simulation file. | |
virtual void | printParameters (const GmLogCategory &logger) |
Asks the process to print all of its parameters using the provided logger. More... | |
virtual void | loadFunctions (LuaTable &table)=0 |
Virtual function that should be implemented by plugins to fill table with the set of functions exported by this process object. | |
virtual QStringList | functionList () const =0 |
Returns the set of function names exported by this process object. | |
![]() | |
GmPluginObject (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
Constructor. More... | |
virtual | ~GmPluginObject () |
Destructor. | |
QString | id () const |
Returns the object id. | |
QString | description () const |
Returns the object description. | |
QString | pluginTypeName () const |
Returns the hierarchical type name for the plugin object type. See also pluginName() and pluginType(). | |
virtual const char * | pluginName () const =0 |
Returns a string identifying the plugin which implements this object. Should return the SAME string as the one read from the plugin information file in the pluginName field. | |
virtual const char * | pluginType () const =0 |
Returns the string identifying the plugin object type. Should return the SAME string as the one read from the plugin information file in the objectTypes table. More... | |
Protected Member Functions | |
template<class T > | |
void | registerFunctions (LuaTable &table, typename GmProcessMethodRedirector< T >::MethodRegistry *methods, bool enableLogging=true) |
Helper function to make it very easy to implement loadFunctions() More... | |
template<class T > | |
QStringList | buildFunctionList (typename GmProcessMethodRedirector< T >::MethodRegistry *methods) const |
Helper function to make it very easy to implement functionList() and keep it consistent with loadFunctions(). More... | |
![]() | |
virtual const GmLogCategory & | logger () const |
Returns the internal logger used by the plugin to emmit messages. | |
GmSimulationData * | simulationData () const |
Returns a reference to the simulation data object keeping global simulation information. | |
Base interface class for Process type plugins.
GmProcess::GmProcess | ( | GmSimulationData * | simulation, |
QString | id, | ||
QString | description, | ||
const GmLogCategory & | logger | ||
) |
Constructor.
simulation | Reference to the simulation object. |
id | Process id. |
description | Process description. |
logger | Plugin logger object used to emmit messages |
|
inlineprotected |
Helper function to make it very easy to implement functionList() and keep it consistent with loadFunctions().
In functionList(), just call this function passing as parameter the same table passed to registerFunctions() by loadFunctions().
|
virtual |
Asks the process to print all of its parameters using the provided logger.
The default implementation logs the data, as seen through the access interface;
Implements GmPluginObject.
|
inlineprotected |
Helper function to make it very easy to implement loadFunctions()
In loadFuntions(), just define a static table with the name <--> method mapping and call registerFunctions(). See GmpIoProcess::loadFunctions() for an example. Remember that the table must be NULL terminated and static.