36#include "AbstractCardiacCellWithModifiers.hpp"
37#include "AbstractCvodeCellWithDataClamp.hpp"
38#include "DummyModifier.hpp"
40template<
class CARDIAC_CELL>
43 mModifiersMap[modifierName] = &pModifier;
44 pModifier = boost::shared_ptr<AbstractModifier>(
new DummyModifier());
47template<
class CARDIAC_CELL>
49 unsigned numberOfStateVariables,
50 unsigned voltageIndex,
51 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
52 :
CARDIAC_CELL(pOdeSolver, numberOfStateVariables, voltageIndex, pIntracellularStimulus)
57template<
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]);
67template<
class CARDIAC_CELL>
70 return !(mModifiersMap.find(rModifierName) == mModifiersMap.end());
73template<
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)
void AddModifier(std::string modifierName, boost::shared_ptr< AbstractModifier > &pModifier)
bool HasModifier(const std::string &rModifierName) const
boost::shared_ptr< AbstractModifier > GetModifier(const std::string &rModifierName)
std::map< std::string, boost::shared_ptr< AbstractModifier > * > mModifiersMap
void SetModifier(const std::string &rModifierName, boost::shared_ptr< AbstractModifier > &pNewModifier)