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

Base interface class for all object plugins. More...

#include <gmPluginObject.h>

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

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 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.
 

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GmPluginObject()

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

Constructor.

Parameters
simulationReference to the simulation object.
idObject id.
descriptionObject description.
loggerPlugin logger object used to emmit messages

Member Function Documentation

◆ pluginType()

virtual const char* GmPluginObject::pluginType ( ) const
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.

◆ printParameters()

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


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