GemaCoreLib
The GeMA Core library
Public Member Functions | Protected Member Functions | List of all members
GmProcess Class Referenceabstract

Base interface class for Process type plugins. More...

#include <gmProcess.h>

Inheritance diagram for GmProcess:
Inheritance graph
[legend]
Collaboration diagram for GmProcess:
Collaboration graph
[legend]

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.
 
- Public Member Functions inherited from GmPluginObject
 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...
 
- Protected Member Functions inherited from GmPluginObject
virtual const GmLogCategorylogger () const
 Returns the internal logger used by the plugin to emmit messages.
 
GmSimulationDatasimulationData () const
 Returns a reference to the simulation data object keeping global simulation information.
 

Detailed Description

Base interface class for Process type plugins.

Constructor & Destructor Documentation

◆ GmProcess()

GmProcess::GmProcess ( GmSimulationData simulation,
QString  id,
QString  description,
const GmLogCategory logger 
)

Constructor.

Parameters
simulationReference to the simulation object.
idProcess id.
descriptionProcess description.
loggerPlugin logger object used to emmit messages

Member Function Documentation

◆ buildFunctionList()

template<class T >
QStringList GmProcess::buildFunctionList ( typename GmProcessMethodRedirector< T >::MethodRegistry *  methods) const
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().

◆ printParameters()

void GmProcess::printParameters ( const GmLogCategory logger)
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.

◆ registerFunctions()

template<class T >
void GmProcess::registerFunctions ( LuaTable table,
typename GmProcessMethodRedirector< T >::MethodRegistry *  methods,
bool  enableLogging = true 
)
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.


The documentation for this class was generated from the following files: