36 #include "AbstractCardiacCellWithModifiers.hpp"
37 #include "AbstractCvodeCellWithDataClamp.hpp"
38 #include "DummyModifier.hpp"
40 template<
class CARDIAC_CELL>
43 mModifiersMap[modifierName] = &pModifier;
44 pModifier = boost::shared_ptr<AbstractModifier>(
new DummyModifier());
47 template<
class CARDIAC_CELL>
49 unsigned numberOfStateVariables,
50 unsigned voltageIndex,
51 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
52 :
CARDIAC_CELL(pOdeSolver, numberOfStateVariables, voltageIndex, pIntracellularStimulus)
57 template<
class CARDIAC_CELL>
60 if (mModifiersMap.find(rModifierName) == mModifiersMap.end())
62 EXCEPTION(
"There is no modifier called " + rModifierName +
" in this model.");
64 return *(mModifiersMap[rModifierName]);
67 template<
class CARDIAC_CELL>
70 return !(mModifiersMap.find(rModifierName) == mModifiersMap.end());
73 template<
class CARDIAC_CELL>
76 if (mModifiersMap.find(rModifierName) == mModifiersMap.end())
78 EXCEPTION(
"There is no modifier called " + rModifierName +
" in this model.");
80 *(mModifiersMap[rModifierName]) = pNewModifier;
#define EXCEPTION(message)
AbstractCardiacCellWithModifiers(boost::shared_ptr< AbstractIvpOdeSolver > pOdeSolver, unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
std::map< std::string, boost::shared_ptr< AbstractModifier > * > mModifiersMap
boost::shared_ptr< AbstractModifier > GetModifier(const std::string &rModifierName)
void SetModifier(const std::string &rModifierName, boost::shared_ptr< AbstractModifier > &pNewModifier)
void AddModifier(std::string modifierName, boost::shared_ptr< AbstractModifier > &pModifier)
bool HasModifier(const std::string &rModifierName) const