T2SwapCellKiller.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef T2SWAPCELLKILLER_HPP_
00037 #define T2SWAPCELLKILLER_HPP_
00038
00039 #include "AbstractCellKiller.hpp"
00040
00041 #include "ChasteSerialization.hpp"
00042 #include <boost/serialization/base_object.hpp>
00043
00044 #include "VertexBasedCellPopulation.hpp"
00045
00053 template<unsigned DIM>
00054 class T2SwapCellKiller : public AbstractCellKiller<DIM>
00055 {
00056
00057 friend class TestT2SwapCellKiller;
00058
00059 private:
00060
00062 friend class boost::serialization::access;
00069 template<class Archive>
00070 void serialize(Archive & archive, const unsigned int version)
00071 {
00072 archive & boost::serialization::base_object<AbstractCellKiller<DIM> >(*this);
00073 }
00074
00075 public:
00076
00082 T2SwapCellKiller(AbstractCellPopulation<DIM>* pCellPopulation);
00083
00089 void CheckAndLabelCellsForApoptosisOrDeath();
00090
00096 void OutputCellKillerParameters(out_stream& rParamsFile);
00097 };
00098
00099 #include "SerializationExportWrapper.hpp"
00100 EXPORT_TEMPLATE_CLASS_SAME_DIMS(T2SwapCellKiller)
00101
00102 namespace boost
00103 {
00104 namespace serialization
00105 {
00109 template<class Archive, unsigned DIM>
00110 inline void save_construct_data(
00111 Archive & ar, const T2SwapCellKiller<DIM> * t, const BOOST_PFTO unsigned int file_version)
00112 {
00113
00114 const AbstractCellPopulation<DIM>* const p_cell_population = t->GetCellPopulation();
00115 ar << p_cell_population;
00116 }
00117
00121 template<class Archive, unsigned DIM>
00122 inline void load_construct_data(
00123 Archive & ar, T2SwapCellKiller<DIM> * t, const unsigned int file_version)
00124 {
00125
00126 AbstractCellPopulation<DIM>* p_cell_population;
00127 ar >> p_cell_population;
00128
00129
00130 ::new(t)T2SwapCellKiller<DIM>(p_cell_population);
00131 }
00132 }
00133 }
00134
00135 #endif