36 #ifndef ABSTRACTCARDIACCELLWITHMODIFIERS_HPP_
37 #define ABSTRACTCARDIACCELLWITHMODIFIERS_HPP_
39 #include <boost/shared_ptr.hpp>
43 #include "AbstractCvodeCell.hpp"
44 #include "AbstractCvodeCellWithDataClamp.hpp"
45 #include "AbstractCardiacCell.hpp"
47 #include "AbstractModifier.hpp"
48 #include "AbstractIvpOdeSolver.hpp"
49 #include "AbstractStimulusFunction.hpp"
53 #include <boost/serialization/shared_ptr.hpp>
54 #include <boost/serialization/base_object.hpp>
55 #include <boost/serialization/split_member.hpp>
61 template<
class CARDIAC_CELL>
73 template<
class Archive>
74 void save(Archive & archive,
const unsigned int version)
const
77 archive & boost::serialization::base_object<CARDIAC_CELL>(*this);
83 std::map<std::string, boost::shared_ptr<AbstractModifier>* >::const_iterator iter;
86 const boost::shared_ptr<AbstractModifier>* p_to_smart_pointer = (*iter).second;
87 const boost::shared_ptr<AbstractModifier> p_modifier = *p_to_smart_pointer;
88 archive & (*iter).first;
98 template<
class Archive>
99 void load(Archive & archive,
const unsigned int version)
102 archive & boost::serialization::base_object<CARDIAC_CELL>(*this);
107 std::map<std::string, boost::shared_ptr<AbstractModifier>* >::iterator iter;
110 boost::shared_ptr<AbstractModifier>* p_to_constructed_smart_pointer = (*iter).second;
111 boost::shared_ptr<AbstractModifier> p_loaded;
112 std::string modifier_name;
113 archive & modifier_name;
117 if ((*iter).first != modifier_name)
126 *(p_to_constructed_smart_pointer) = p_loaded;
129 BOOST_SERIALIZATION_SPLIT_MEMBER()
156 unsigned numberOfStateVariables,
157 unsigned voltageIndex,
175 bool HasModifier(const std::
string& rModifierName) const;
190 namespace serialization {
193 struct is_abstract<AbstractCardiacCellWithModifiers<C> >
194 TEMPLATED_CLASS_IS_ABSTRACT_DEFN
197 struct is_abstract<const AbstractCardiacCellWithModifiers<C> >
198 TEMPLATED_CLASS_IS_ABSTRACT_DEFN
void load(Archive &archive, const unsigned int version)
std::map< std::string, boost::shared_ptr< AbstractModifier > * > mModifiersMap
void save(Archive &archive, const unsigned int version) const
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)
friend class boost::serialization::access
bool HasModifier(const std::string &rModifierName) const