![]() |
GemaCoreLib
The GeMA Core library
|
Base interface class for all object plugins. More...
#include <gmPluginObject.h>
Public Member Functions | |
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 * | pluginCategory () const =0 |
Returns the plugin category. | |
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... | |
virtual bool | loadPrivateData (LuaTable &table)=0 |
Function called by the model loader to give the object acess to it's private parameters. Should return false only if the received parameter set makes the use of this object impossible. | |
virtual void | printParameters (const GmLogCategory &logger)=0 |
Asks the object to print all of its parameters using the provided logger. More... | |
Protected Member Functions | |
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. | |
Private Attributes | |
GmSimulationData * | _simData |
Reference to the simulation object keeping all simulation data information. | |
QString | _id |
Object unique id. | |
QString | _description |
Object description. | |
const GmLogCategory & | _logger |
Reference to the plugin private logger. | |
Base interface class for all object plugins.
Must be implemented by every physical plugin object.
This base class implementation includes storage for some common attributes, required for every plugin, and some basic common routine interfaces, such as loading attributes and printing basic data.
GmPluginObject::GmPluginObject | ( | GmSimulationData * | simulation, |
QString | id, | ||
QString | description, | ||
const GmLogCategory & | logger | ||
) |
Constructor.
simulation | Reference to the simulation object. |
id | Object id. |
description | Object description. |
logger | Plugin logger object used to emmit messages |
|
pure virtual |
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.
Notice that this function DOES NOT return the hierarchical name of the plugin object, which is composed by pluginName() + '.' + pluginType(). The hierarchical name can be obtained by a call to pluginTypeName().
Implemented in GmPhysicsUserFunctions.
|
pure virtual |
Asks the object to print all of its parameters using the provided logger.
The default implementation logs the basic data stored in this class. Reimplementations of this function should probably call this basic function to keep consistency.
Implemented in GmCellMesh, GmMesh, GmPhysicsUserFunctions, GmPropertySet, GmSpatialIndex, GmElementMesh, GmNumSolver, GmPhysics, and GmProcess.