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>
61template<
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;
189namespace serialization {
#define TEMPLATED_CLASS_IS_ABSTRACT_DEFN
void AddModifier(std::string modifierName, boost::shared_ptr< AbstractModifier > &pModifier)
bool HasModifier(const std::string &rModifierName) const
void load(Archive &archive, const unsigned int version)
boost::shared_ptr< AbstractModifier > GetModifier(const std::string &rModifierName)
friend class boost::serialization::access
void save(Archive &archive, const unsigned int version) const
std::map< std::string, boost::shared_ptr< AbstractModifier > * > mModifiersMap
void SetModifier(const std::string &rModifierName, boost::shared_ptr< AbstractModifier > &pNewModifier)