39 #include <boost/utility.hpp>
40 #include <boost/shared_ptr.hpp>
41 #include <boost/enable_shared_from_this.hpp>
44 #include <boost/serialization/shared_ptr.hpp>
46 #include "AbstractCellMutationState.hpp"
47 #include "AbstractCellProliferativeType.hpp"
48 #include "DefaultCellProliferativeType.hpp"
49 #include "CellLabel.hpp"
50 #include "CellAncestor.hpp"
52 #include "CellData.hpp"
53 #include "CellVecData.hpp"
55 #include "ApoptoticCellProperty.hpp"
56 #include "AbstractCellCycleModel.hpp"
57 #include "AbstractSrnModel.hpp"
58 #include "SimulationTime.hpp"
59 #include "CellPropertyRegistry.hpp"
60 #include "CellPropertyCollection.hpp"
68 typedef boost::shared_ptr<Cell> CellPtr;
77 class Cell :
private boost::noncopyable,
public boost::enable_shared_from_this<Cell>
92 template<
class Archive>
93 void serialize(Archive & archive,
const unsigned int version)
153 Cell(boost::shared_ptr<AbstractCellProperty> pMutationState,
156 bool archiving=
false,
275 void SetMutationState(boost::shared_ptr<AbstractCellProperty> pMutationState);
295 void AddCellProperty(
const boost::shared_ptr<AbstractCellProperty>& rProperty);
304 template<
typename CLASS>
307 bool cell_has_property =
false;
313 if ((*property_iter)->IsType<CLASS>())
315 cell_has_property =
true;
316 (*property_iter)->DecrementCellCount();
321 if (cell_has_property)
331 template<
typename CLASS>
395 void SetAncestor(boost::shared_ptr<AbstractCellProperty> pCellAncestor);
415 namespace serialization
420 template<
class Archive>
421 inline void save_construct_data(
422 Archive & ar,
const Cell * t,
const unsigned int file_version)
425 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->
GetMutationState();
426 ar & p_mutation_state;
429 ar & p_cell_cycle_model;
435 ar & r_cell_property_collection;
441 template<
class Archive>
442 inline void load_construct_data(
443 Archive & ar,
Cell * t,
const unsigned int file_version)
446 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
447 ar & p_mutation_state;
450 ar & p_cell_cycle_model;
455 bool archiving =
true;
458 ar & cell_property_collection;
461 ::new(t)
Cell(p_mutation_state, p_cell_cycle_model, p_srn_model, archiving, cell_property_collection);
void InitialiseSrnModel()
AbstractCellCycleModel * GetCellCycleModel() const
void serialize(Archive &archive, const unsigned int version)
double GetBirthTime() const
double GetTimeUntilDeath() const
void InitialiseCellCycleModel()
void SetCellCycleModel(AbstractCellCycleModel *pCellCycleModel)
AbstractSrnModel * mpSrnModel
double GetStartOfApoptosisTime() const
unsigned GetAncestor() const
boost::shared_ptr< AbstractCellProliferativeType > GetCellProliferativeType() const
void AddCellProperty(const boost::shared_ptr< AbstractCellProperty > &rProperty)
void SetApoptosisTime(double apoptosisTime)
boost::shared_ptr< CellVecData > GetCellVecData() const
bool mUndergoingApoptosis
double GetApoptosisTime() const
CellPropertyCollection & rGetCellPropertyCollection()
void SetCellProliferativeType(boost::shared_ptr< AbstractCellProperty > pProliferativeType)
bool HasApoptosisBegun() const
AbstractCellCycleModel * mpCellCycleModel
AbstractSrnModel * GetSrnModel() const
void StartApoptosis(bool setDeathTime=true)
bool HasProperty(const boost::shared_ptr< AbstractCellProperty > &rProp) const
friend class boost::serialization::access
bool HasCellVecData() const
unsigned GetCellId() const
CellPropertyCollection mCellPropertyCollection
boost::shared_ptr< CellData > GetCellData() const
void SetMutationState(boost::shared_ptr< AbstractCellProperty > pMutationState)
#define CHASTE_CLASS_EXPORT(T)
void SetBirthTime(double birthTime)
void SetAncestor(boost::shared_ptr< AbstractCellProperty > pCellAncestor)
void SetSrnModel(AbstractSrnModel *pSrnModel)
double mStartOfApoptosisTime
void RemoveCellProperty()
bool HasCellProperty() const
Cell(boost::shared_ptr< AbstractCellProperty > pMutationState, AbstractCellCycleModel *pCellCycleModel, AbstractSrnModel *pSrnModel=NULL, bool archiving=false, CellPropertyCollection cellPropertyCollection=CellPropertyCollection())
boost::shared_ptr< AbstractCellMutationState > GetMutationState() const