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 "CellData.hpp"
49 #include "CellVecData.hpp"
51 #include "AbstractCellCycleModel.hpp"
52 #include "AbstractSrnModel.hpp"
53 #include "CellPropertyCollection.hpp"
60 typedef boost::shared_ptr<Cell> CellPtr;
89 class Cell :
private boost::noncopyable,
public boost::enable_shared_from_this<Cell>
104 template<
class Archive>
105 void serialize(Archive & archive,
const unsigned int version)
165 Cell(boost::shared_ptr<AbstractCellProperty> pMutationState,
168 bool archiving=
false,
287 void SetMutationState(boost::shared_ptr<AbstractCellProperty> pMutationState);
307 void AddCellProperty(
const boost::shared_ptr<AbstractCellProperty>& rProperty);
316 template<
typename CLASS>
319 bool cell_has_property =
false;
325 if ((*property_iter)->IsType<CLASS>())
327 cell_has_property =
true;
328 (*property_iter)->DecrementCellCount();
333 if (cell_has_property)
343 template<
typename CLASS>
407 void SetAncestor(boost::shared_ptr<AbstractCellProperty> pCellAncestor);
427 namespace serialization
432 template<
class Archive>
433 inline void save_construct_data(
434 Archive & ar,
const Cell * t,
const unsigned int file_version)
437 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->
GetMutationState();
438 ar & p_mutation_state;
441 ar & p_cell_cycle_model;
447 ar & r_cell_property_collection;
453 template<
class Archive>
454 inline void load_construct_data(
455 Archive & ar,
Cell * t,
const unsigned int file_version)
458 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
459 ar & p_mutation_state;
462 ar & p_cell_cycle_model;
467 bool archiving =
true;
470 ar & cell_property_collection;
473 ::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 operator()(void const *) 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)
Cell(boost::shared_ptr< AbstractCellProperty > pMutationState, AbstractCellCycleModel *pCellCycleModel, AbstractSrnModel *pSrnModel=nullptr, bool archiving=false, CellPropertyCollection cellPropertyCollection=CellPropertyCollection())
void SetAncestor(boost::shared_ptr< AbstractCellProperty > pCellAncestor)
void SetSrnModel(AbstractSrnModel *pSrnModel)
double mStartOfApoptosisTime
void RemoveCellProperty()
gcov doesn't like this file...
bool HasCellProperty() const
boost::shared_ptr< AbstractCellMutationState > GetMutationState() const