Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
AbstractCardiacCellWithModifiers< CARDIAC_CELL > Class Template Reference

#include <AbstractCardiacCellWithModifiers.hpp>

+ Inheritance diagram for AbstractCardiacCellWithModifiers< CARDIAC_CELL >:
+ Collaboration diagram for AbstractCardiacCellWithModifiers< CARDIAC_CELL >:

Public Member Functions

 AbstractCardiacCellWithModifiers (boost::shared_ptr< AbstractIvpOdeSolver > pOdeSolver, unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
 
boost::shared_ptr< AbstractModifierGetModifier (const std::string &rModifierName)
 
bool HasModifier (const std::string &rModifierName) const
 
void SetModifier (const std::string &rModifierName, boost::shared_ptr< AbstractModifier > &pNewModifier)
 

Protected Member Functions

void AddModifier (std::string modifierName, boost::shared_ptr< AbstractModifier > &pModifier)
 

Private Member Functions

template<class Archive >
void save (Archive &archive, const unsigned int version) const
 
template<class Archive >
void load (Archive &archive, const unsigned int version)
 

Private Attributes

std::map< std::string, boost::shared_ptr< AbstractModifier > * > mModifiersMap
 

Friends

class boost::serialization::access
 

Detailed Description

template<class CARDIAC_CELL>
class AbstractCardiacCellWithModifiers< CARDIAC_CELL >

A base class for cardiac cells that have been altered to include calls to subclasses of AbstractModifier when computing their derivatives.

Definition at line 62 of file AbstractCardiacCellWithModifiers.hpp.

Constructor & Destructor Documentation

◆ AbstractCardiacCellWithModifiers()

template<class CARDIAC_CELL >
AbstractCardiacCellWithModifiers< CARDIAC_CELL >::AbstractCardiacCellWithModifiers ( boost::shared_ptr< AbstractIvpOdeSolver pOdeSolver,
unsigned  numberOfStateVariables,
unsigned  voltageIndex,
boost::shared_ptr< AbstractStimulusFunction pIntracellularStimulus 
)

Create a new cardiac cell.

This calls the main CARDIAC_CELL constructor, but also supplies modifiers for working with metadata-enabled CellML files.

Parameters
pOdeSolverthe ODE solver to use when simulating this cell
numberOfStateVariablesthe size of the ODE system modelling this cell
voltageIndexthe index of the transmembrane potential within the vector of state variables
pIntracellularStimulusthe intracellular stimulus current

Definition at line 48 of file AbstractCardiacCellWithModifiers.cpp.

References AbstractCardiacCellWithModifiers< CARDIAC_CELL >::mModifiersMap.

Member Function Documentation

◆ AddModifier()

template<class CARDIAC_CELL >
void AbstractCardiacCellWithModifiers< CARDIAC_CELL >::AddModifier ( std::string  modifierName,
boost::shared_ptr< AbstractModifier > &  pModifier 
)
protected

Add a new modifier - should only be called by the subclass constructors. Each modifier pointer is set to a DummyModifier by this method.

Parameters
modifierNameThe name which will act as a 'key' for this modifier.
pModifierThe pointer to the modifier in the concrete class.

Definition at line 41 of file AbstractCardiacCellWithModifiers.cpp.

◆ GetModifier()

template<class CARDIAC_CELL >
boost::shared_ptr< AbstractModifier > AbstractCardiacCellWithModifiers< CARDIAC_CELL >::GetModifier ( const std::string &  rModifierName)

Get access to a modifier

Parameters
rModifierNameThe oxmeta name of the modifier to fetch.
Returns
a pointer to the specified modifier

Definition at line 58 of file AbstractCardiacCellWithModifiers.cpp.

References EXCEPTION.

◆ HasModifier()

template<class CARDIAC_CELL >
bool AbstractCardiacCellWithModifiers< CARDIAC_CELL >::HasModifier ( const std::string &  rModifierName) const

Check for the presence of a modifier. To avoid the necessity of using try...catch around every call to GetModifier().

Parameters
rModifierNameThe oxmeta name of a modifier
Returns
whether or not the cell has one of these modifiers.

Definition at line 68 of file AbstractCardiacCellWithModifiers.cpp.

◆ load()

template<class CARDIAC_CELL >
template<class Archive >
void AbstractCardiacCellWithModifiers< CARDIAC_CELL >::load ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Unarchive the member variables.

Parameters
archive
version

Definition at line 99 of file AbstractCardiacCellWithModifiers.hpp.

References AbstractCardiacCellWithModifiers< CARDIAC_CELL >::mModifiersMap, and NEVER_REACHED.

◆ save()

template<class CARDIAC_CELL >
template<class Archive >
void AbstractCardiacCellWithModifiers< CARDIAC_CELL >::save ( Archive &  archive,
const unsigned int  version 
) const
inlineprivate

Archive the member variables.

Parameters
archive
version

Definition at line 74 of file AbstractCardiacCellWithModifiers.hpp.

References AbstractCardiacCellWithModifiers< CARDIAC_CELL >::mModifiersMap.

◆ SetModifier()

template<class CARDIAC_CELL >
void AbstractCardiacCellWithModifiers< CARDIAC_CELL >::SetModifier ( const std::string &  rModifierName,
boost::shared_ptr< AbstractModifier > &  pNewModifier 
)

Set a new modifier

Parameters
rModifierNameThe oxmeta name of the modifier to replace.
pNewModifierThe new modifier object to use.

Definition at line 74 of file AbstractCardiacCellWithModifiers.cpp.

References EXCEPTION.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<class CARDIAC_CELL >
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 66 of file AbstractCardiacCellWithModifiers.hpp.

Member Data Documentation

◆ mModifiersMap

template<class CARDIAC_CELL >
std::map<std::string, boost::shared_ptr<AbstractModifier>* > AbstractCardiacCellWithModifiers< CARDIAC_CELL >::mModifiersMap
private

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