GemaCoreLib
The GeMA Core library
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GmSolutionData Class Reference

Auxiliar class used to store the complete set of solution methods data for a simulation. More...

#include <gmSolutionData.h>

Collaboration diagram for GmSolutionData:
Collaboration graph
[legend]

Public Member Functions

 GmSolutionData ()
 Constructor.
 
 ~GmSolutionData ()
 Destructor.
 
void clear ()
 Clears the solution data, deleting every solution object and restoring the object to its construction state.
 
const QMap< QString, GmPhysics * > & physics () const
 Returns a const refernce to the state vars map.
 
const QMap< QString, GmNumSolver * > & numSolvers () const
 Returns a const refernce to the numerical solvers map.
 
bool addPhysics (GmPhysics *phys)
 Adds a physical method to the model. Returns false if an object with the same id already exists. The model takes ownership of the object.
 
bool addNumSolver (GmNumSolver *nsolver)
 Adds a numeric solver to the model. Returns false if an object with the same id already exists. The model takes ownership of the object.
 
LuaFunctionmainScript ()
 Returns a reference for the main lua script.
 
const QMap< QString, QString > & processSetMap () const
 Returns the map asscoiating process set names with plugin names.
 
void setMainScript (LuaFunction &f)
 Updates the main Lua script used for the simulation.
 
bool addProcessSet (QString setName, QString pluginName)
 Adds a new entry to the process set map. Returns false if the setName already exists in the map.
 
void printInfo (const GmLogCategory &logger)
 Prints information about the simulation using the provided logger (Info category)
 

Private Member Functions

template<class T >
bool addObjectToMap (T *obj, QMap< QString, T * > &map)
 Adds a new object to the list of existing ones. If an object with the same id already exists, does nothing. More...
 

Private Attributes

LuaFunction _mainScript
 Reference for the main script function.
 
QMap< QString, QString_processSetMap
 Map storing for each process function group the name of the plugin that implements it.
 
QMap< QString, GmPhysics * > _physicsMap
 Map storing physics objects, keyed by physics id.
 
QMap< QString, GmNumSolver * > _numSolverMap
 Map storing numeric solvers, keyed by solver id.
 

Detailed Description

Auxiliar class used to store the complete set of solution methods data for a simulation.

Member Function Documentation

◆ addObjectToMap()

template<class T >
template bool GmSolutionData::addObjectToMap< GmNumSolver > ( T *  obj,
QMap< QString, T * > &  map 
)
private

Adds a new object to the list of existing ones. If an object with the same id already exists, does nothing.

The model will take the ownership of the added object, which means that it will be deleted by the model data. Returns true if the object was inserted in the list.


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