DynamicCellModelLoader Class Reference

#include <DynamicCellModelLoader.hpp>

Collaboration diagram for DynamicCellModelLoader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DynamicCellModelLoader (const std::string &rLoadableModulePath)
 ~DynamicCellModelLoader ()
AbstractCardiacCellInterfaceCreateCell (boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pStimulus)
const std::string GetLoadableModulePath () const

Private Member Functions

typedef
AbstractCardiacCellInterface
CellCreationFunctionType (boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pStimulus)

Private Attributes

void * mpDynamicModule
CellCreationFunctionType * mpCreationFunction
std::string mLoadableModulePath


Detailed Description

This class takes care of loading cell models at run-time from .so files.

Instantiate it with the path of a suitable .so file, then call CreateCell to create individual cells.

Definition at line 45 of file DynamicCellModelLoader.hpp.


Constructor & Destructor Documentation

DynamicCellModelLoader::DynamicCellModelLoader ( const std::string &  rLoadableModulePath  ) 

Create a cell model loader by opening a loadable module (.so file) containing a cell model.

Note:
This loader object must remain alive for as long as you want to use cells created with it, or you'll get a segfault.
Parameters:
rLoadableModulePath path to .so file

Definition at line 36 of file DynamicCellModelLoader.cpp.

References CellCreationFunctionType(), EXCEPTION, mpCreationFunction, and mpDynamicModule.

DynamicCellModelLoader::~DynamicCellModelLoader (  ) 

Destructor. Closes the .so file.

Definition at line 60 of file DynamicCellModelLoader.cpp.

References mpDynamicModule.


Member Function Documentation

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.

Note:
This loader object must remain alive for as long as you want to use the cell, or you'll get a segfault.
Parameters:
pSolver ODE solver used to simulate the cell
pStimulus intracellular stimulus

Definition at line 68 of file DynamicCellModelLoader.cpp.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus().

const std::string DynamicCellModelLoader::GetLoadableModulePath (  )  const

Returns:
the absolute path to the .so file we have loaded

Definition at line 82 of file DynamicCellModelLoader.cpp.

References mLoadableModulePath.

Referenced by AbstractDynamicallyLoadableEntity::save(), and AbstractCardiacTissue< SPACE_DIM >::SaveCardiacCells().

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

Parameters:
pSolver ODE solver used to simulate the cell
pStimulus intracellular stimulus

Referenced by DynamicCellModelLoader().


Member Data Documentation

Handle for the loaded .so file

Definition at line 85 of file DynamicCellModelLoader.hpp.

Referenced by DynamicCellModelLoader(), and ~DynamicCellModelLoader().

CellCreationFunctionType* DynamicCellModelLoader::mpCreationFunction [private]

Our cell creation function

Definition at line 96 of file DynamicCellModelLoader.hpp.

Referenced by DynamicCellModelLoader().

Absolute path to the .so file we have loaded.

Definition at line 99 of file DynamicCellModelLoader.hpp.

Referenced by GetLoadableModulePath().


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

Generated on Mon Nov 1 12:36:39 2010 for Chaste by  doxygen 1.5.5