Chaste Release::3.1
|
#include <DynamicCellModelLoader.hpp>
Public Member Functions | |
~DynamicCellModelLoader () | |
AbstractCardiacCellInterface * | CreateCell (boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pStimulus) |
const std::string | GetLoadableModulePath () const |
Static Public Member Functions | |
static DynamicCellModelLoaderPtr | Create (const std::string &rLoadableModulePath) |
Private Types | |
typedef AbstractCardiacCellInterface * | CellCreationFunctionType (boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pStimulus) |
Private Member Functions | |
DynamicCellModelLoader (const std::string &rLoadableModulePath) | |
Private Attributes | |
void * | mpDynamicModule |
CellCreationFunctionType * | mpCreationFunction |
std::string | mLoadableModulePath |
This class takes care of loading cell models at run-time from .so files.
Instantiate it using the factory function Create with the path of a suitable .so file, then call CreateCell to create individual cells.
Definition at line 59 of file DynamicCellModelLoader.hpp.
typedef AbstractCardiacCellInterface* DynamicCellModelLoader::CellCreationFunctionType(boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pStimulus) [private] |
Type of the cell creation function in the .so files
pSolver | ODE solver used to simulate the cell |
pStimulus | intracellular stimulus |
Definition at line 111 of file DynamicCellModelLoader.hpp.
DynamicCellModelLoader::~DynamicCellModelLoader | ( | ) |
Destructor. Closes the .so file.
Definition at line 75 of file DynamicCellModelLoader.cpp.
References mpDynamicModule.
DynamicCellModelLoader::DynamicCellModelLoader | ( | const std::string & | rLoadableModulePath | ) | [private] |
Private constructor to ensure we're always stored in a shared pointer.
rLoadableModulePath | path to .so file |
Definition at line 51 of file DynamicCellModelLoader.cpp.
References EXCEPTION, mpCreationFunction, and mpDynamicModule.
Referenced by Create().
DynamicCellModelLoaderPtr DynamicCellModelLoader::Create | ( | const std::string & | rLoadableModulePath | ) | [static] |
Create a cell model loader by opening a loadable module (.so file) containing a cell model.
rLoadableModulePath | path to .so file |
Definition at line 44 of file DynamicCellModelLoader.cpp.
References DynamicCellModelLoader().
Referenced by DynamicModelLoaderRegistry::GetLoader().
AbstractCardiacCellInterface * DynamicCellModelLoader::CreateCell | ( | boost::shared_ptr< AbstractIvpOdeSolver > | pSolver, |
boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ||
) |
Create a new cardiac cell from this dynamic module.
The caller takes responsibility for deleting the cell when it's finished with.
pSolver | ODE solver used to simulate the cell |
pStimulus | intracellular stimulus |
Definition at line 83 of file DynamicCellModelLoader.cpp.
const std::string DynamicCellModelLoader::GetLoadableModulePath | ( | ) | const |
Definition at line 95 of file DynamicCellModelLoader.cpp.
References mLoadableModulePath.
std::string DynamicCellModelLoader::mLoadableModulePath [private] |
Absolute path to the .so file we have loaded.
Definition at line 118 of file DynamicCellModelLoader.hpp.
Referenced by GetLoadableModulePath().
Our cell creation function
Definition at line 115 of file DynamicCellModelLoader.hpp.
Referenced by DynamicCellModelLoader().
void* DynamicCellModelLoader::mpDynamicModule [private] |
Handle for the loaded .so file
Definition at line 104 of file DynamicCellModelLoader.hpp.
Referenced by DynamicCellModelLoader(), and ~DynamicCellModelLoader().