#include <Cell.hpp>
Public Member Functions | |
Cell (boost::shared_ptr< AbstractCellProperty > pMutationState, AbstractCellCycleModel *pCellCycleModel, bool archiving=false, CellPropertyCollection cellPropertyCollection=CellPropertyCollection()) | |
~Cell () | |
void | SetBirthTime (double birthTime) |
void | SetCellCycleModel (AbstractCellCycleModel *pCellCycleModel) |
AbstractCellCycleModel * | GetCellCycleModel () const |
void | InitialiseCellCycleModel () |
double | GetAge () const |
double | GetBirthTime () const |
double | GetStartOfApoptosisTime () const |
double | GetApoptosisTime () const |
void | SetApoptosisTime (double apoptosisTime) |
boost::shared_ptr < AbstractCellMutationState > | GetMutationState () const |
void | SetMutationState (boost::shared_ptr< AbstractCellProperty > pMutationState) |
CellPropertyCollection & | rGetCellPropertyCollection () |
const CellPropertyCollection & | rGetCellPropertyCollection () const |
void | AddCellProperty (const boost::shared_ptr< AbstractCellProperty > &rProperty) |
template<typename CLASS> | |
void | RemoveCellProperty () |
template<typename CLASS> | |
bool | HasCellProperty () const |
bool | ReadyToDivide () |
CellPtr | Divide () |
void | StartApoptosis (bool setDeathTime=true) |
void | Kill () |
bool | HasApoptosisBegun () const |
double | GetTimeUntilDeath () const |
bool | IsDead () |
void | SetLogged () |
bool | IsLogged () |
void | SetAncestor (unsigned ancestorIndex) |
unsigned | GetAncestor () const |
unsigned | GetCellId () const |
Static Public Member Functions | |
static void | ResetMaxCellId () |
Protected Attributes | |
CellPropertyCollection | mCellPropertyCollection |
AbstractCellCycleModel * | mpCellCycleModel |
unsigned | mAncestor |
unsigned | mCellId |
double | mDeathTime |
double | mStartOfApoptosisTime |
double | mApoptosisTime |
bool | mUndergoingApoptosis |
bool | mIsDead |
bool | mIsLogged |
Static Protected Attributes | |
static unsigned | mMaxCellId = 0 |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
bool | mCanDivide |
Friends | |
class | boost::serialization::access |
This class should not store any spatial information - cells are linked to space by the AbstractCellPopulation subclasses.
Definition at line 61 of file Cell.hpp.
Cell::Cell | ( | boost::shared_ptr< AbstractCellProperty > | pMutationState, | |
AbstractCellCycleModel * | pCellCycleModel, | |||
bool | archiving = false , |
|||
CellPropertyCollection | cellPropertyCollection = CellPropertyCollection() | |||
) |
Create a new cell.
pMutationState | the mutation state of the cell | |
pCellCycleModel | the cell-cycle model to use to decide when the cell divides. This MUST be allocated using new, and will be deleted when the cell is destroyed. | |
archiving | whether this constructor is being called by the archiver - do things slightly differently! (defaults to false) | |
cellPropertyCollection | the cell property collection (defaults to NULL) |
Definition at line 54 of file Cell.cpp.
References CellPropertyCollection::AddProperty(), CellPropertyCollection::Begin(), CellPropertyCollection::End(), EXCEPTION, CellPropertyCollection::HasProperty(), SimulationTime::Instance(), mCellId, mCellPropertyCollection, mMaxCellId, mpCellCycleModel, and AbstractCellCycleModel::SetCell().
Referenced by Divide().
Cell::~Cell | ( | ) |
Destructor, which frees the memory allocated for our cell-cycle model.
Definition at line 106 of file Cell.cpp.
References Kill(), mIsDead, and mpCellCycleModel.
void Cell::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | the archive | |
version | the current version of this class |
Definition at line 77 of file Cell.hpp.
References mAncestor, mApoptosisTime, mCanDivide, mCellId, mDeathTime, mIsDead, mIsLogged, mMaxCellId, mpCellCycleModel, mStartOfApoptosisTime, and mUndergoingApoptosis.
void Cell::SetBirthTime | ( | double | birthTime | ) |
Set the birth time of the cell - can be negative so that your cells have an age when a simulation begins
birthTime | The time the cell was born (in hours) |
Definition at line 145 of file Cell.cpp.
References mpCellCycleModel, and AbstractCellCycleModel::SetBirthTime().
void Cell::SetCellCycleModel | ( | AbstractCellCycleModel * | pCellCycleModel | ) |
Change the cell-cycle model used. This takes effect immediately.
pCellCycleModel | pointer to the cell-cycle model to use |
Definition at line 115 of file Cell.cpp.
References mpCellCycleModel, and AbstractCellCycleModel::SetCell().
AbstractCellCycleModel * Cell::GetCellCycleModel | ( | ) | const |
Returns a pointer to the Cell's cell-cycle model.
Definition at line 125 of file Cell.cpp.
References mpCellCycleModel.
void Cell::InitialiseCellCycleModel | ( | ) |
Calls Initialise on the cell-cycle model associated with this cell.
Definition at line 130 of file Cell.cpp.
References AbstractCellCycleModel::Initialise(), and mpCellCycleModel.
double Cell::GetAge | ( | ) | const |
Get the cell's age from its cell-cycle model.
Definition at line 135 of file Cell.cpp.
References AbstractCellCycleModel::GetAge(), and mpCellCycleModel.
double Cell::GetBirthTime | ( | ) | const |
Get the cell's birth time from its cell-cycle model.
Definition at line 140 of file Cell.cpp.
References AbstractCellCycleModel::GetBirthTime(), and mpCellCycleModel.
double Cell::GetStartOfApoptosisTime | ( | ) | const |
Get the time at which apoptosis was commanded to start.
Definition at line 230 of file Cell.cpp.
References mStartOfApoptosisTime.
double Cell::GetApoptosisTime | ( | ) | const |
void Cell::SetApoptosisTime | ( | double | apoptosisTime | ) |
Set mApoptosisTime.
apoptosisTime | the new value of mApoptosisTime |
Definition at line 240 of file Cell.cpp.
References mApoptosisTime.
boost::shared_ptr< AbstractCellMutationState > Cell::GetMutationState | ( | ) | const |
Get the cell's current mutation state.
Definition at line 164 of file Cell.cpp.
References CellPropertyCollection::GetPropertiesType(), CellPropertyCollection::GetProperty(), CellPropertyCollection::GetSize(), and mCellPropertyCollection.
Referenced by Divide(), and SetMutationState().
void Cell::SetMutationState | ( | boost::shared_ptr< AbstractCellProperty > | pMutationState | ) |
Set the cell's current mutation state.
pMutationState | the cell's new mutation state |
Definition at line 150 of file Cell.cpp.
References AddCellProperty(), EXCEPTION, GetMutationState(), mCellPropertyCollection, and CellPropertyCollection::RemoveProperty().
CellPropertyCollection & Cell::rGetCellPropertyCollection | ( | ) |
Definition at line 174 of file Cell.cpp.
References mCellPropertyCollection.
const CellPropertyCollection & Cell::rGetCellPropertyCollection | ( | ) | const |
Definition at line 179 of file Cell.cpp.
References mCellPropertyCollection.
void Cell::AddCellProperty | ( | const boost::shared_ptr< AbstractCellProperty > & | rProperty | ) |
Add a cell property to the cell. Use this method instead of calling rGetCellPropertyCollection().AddProperty() directly, to ensure that the cell property keeps correct track of the number of cells with it (if this is done).
rProperty | the property to add |
Definition at line 184 of file Cell.cpp.
References CellPropertyCollection::AddProperty(), CellPropertyCollection::HasProperty(), and mCellPropertyCollection.
Referenced by SetMutationState(), and StartApoptosis().
void Cell::RemoveCellProperty | ( | ) | [inline] |
Remove a cell property of the given type. Use this method instead of calling rGetCellPropertyCollection().AddProperty() directly, to ensure that the cell property keeps correct track of the number of cells with it (if this is done).
Definition at line 245 of file Cell.hpp.
References CellPropertyCollection::Begin(), CellPropertyCollection::End(), mCellPropertyCollection, and CellPropertyCollection::RemoveProperty().
bool Cell::HasCellProperty | ( | ) | const [inline] |
Test whether the cell property collection contains a property that has the exact type CLASS. Just calls mCellPropertyCollection.HasProperty().
Definition at line 273 of file Cell.hpp.
References CellPropertyCollection::HasProperty(), and mCellPropertyCollection.
bool Cell::ReadyToDivide | ( | ) |
Determine if this cell is ready to divide at the current simulation time. MUST be called before calling Divide().
Definition at line 300 of file Cell.cpp.
References IsDead(), mCanDivide, mpCellCycleModel, mUndergoingApoptosis, and AbstractCellCycleModel::ReadyToDivide().
CellPtr Cell::Divide | ( | ) |
Divide this cell to produce a daughter cell. ReadyToDivide MUST have been called at the current time, and returned true.
Definition at line 313 of file Cell.cpp.
References Cell(), AbstractCellCycleModel::CreateCellCycleModel(), GetAncestor(), GetMutationState(), IsDead(), mCanDivide, mCellPropertyCollection, mpCellCycleModel, and AbstractCellCycleModel::ResetForDivision().
void Cell::StartApoptosis | ( | bool | setDeathTime = true |
) |
Make the cell enter apoptosis and sets mDeathTime using the apoptosis time as defined by mApoptosisTime.
setDeathTime | whether we tell the cell exactly when to die (defaults to true) |
Definition at line 204 of file Cell.cpp.
References AddCellProperty(), EXCEPTION, CellPropertyRegistry::Get(), CellPropertyCollection::GetCellPropertyRegistry(), SimulationTime::GetTime(), SimulationTime::Instance(), IsDead(), mApoptosisTime, mCellPropertyCollection, mDeathTime, mStartOfApoptosisTime, and mUndergoingApoptosis.
void Cell::Kill | ( | ) |
This labels the cell as dead, it does not delete the cell, it remains in the CellPopulation until AbstractCellPopulation::RemoveDeadCells() is called.
Definition at line 268 of file Cell.cpp.
References CellPropertyCollection::Begin(), CellPropertyCollection::End(), mCellPropertyCollection, and mIsDead.
bool Cell::HasApoptosisBegun | ( | ) | const |
Returns whether the cell is undergoing apoptosis or not.
Definition at line 225 of file Cell.cpp.
References mUndergoingApoptosis.
double Cell::GetTimeUntilDeath | ( | ) | const |
Definition at line 246 of file Cell.cpp.
References EXCEPTION, SimulationTime::GetTime(), SimulationTime::Instance(), mDeathTime, and mUndergoingApoptosis.
bool Cell::IsDead | ( | ) |
Return whether the cell is dead or undergoing apoptosis.
Definition at line 256 of file Cell.cpp.
References SimulationTime::Instance(), Kill(), mDeathTime, mIsDead, and mUndergoingApoptosis.
Referenced by Divide(), ReadyToDivide(), and StartApoptosis().
void Cell::SetLogged | ( | ) |
bool Cell::IsLogged | ( | ) |
void Cell::SetAncestor | ( | unsigned | ancestorIndex | ) |
unsigned Cell::GetAncestor | ( | ) | const |
unsigned Cell::GetCellId | ( | ) | const |
void Cell::ResetMaxCellId | ( | ) | [static] |
friend class boost::serialization::access [friend] |
bool Cell::mCanDivide [private] |
Caches the result of ReadyToDivide() so Divide() can look at it.
Definition at line 66 of file Cell.hpp.
Referenced by Divide(), ReadyToDivide(), and serialize().
CellPropertyCollection Cell::mCellPropertyCollection [protected] |
The cell's property collection.
Definition at line 98 of file Cell.hpp.
Referenced by AddCellProperty(), Cell(), Divide(), GetMutationState(), HasCellProperty(), Kill(), RemoveCellProperty(), rGetCellPropertyCollection(), SetMutationState(), and StartApoptosis().
AbstractCellCycleModel* Cell::mpCellCycleModel [protected] |
The cell's cell-cycle model.
Definition at line 101 of file Cell.hpp.
Referenced by Cell(), Divide(), GetAge(), GetBirthTime(), GetCellCycleModel(), InitialiseCellCycleModel(), ReadyToDivide(), serialize(), SetBirthTime(), SetCellCycleModel(), and ~Cell().
unsigned Cell::mAncestor [protected] |
An index which is inherited by all children of this cell.
Definition at line 104 of file Cell.hpp.
Referenced by GetAncestor(), serialize(), and SetAncestor().
unsigned Cell::mCellId [protected] |
An identifier which is unique to this cell.
Definition at line 107 of file Cell.hpp.
Referenced by Cell(), GetCellId(), and serialize().
unsigned Cell::mMaxCellId = 0 [static, protected] |
maximum cell identifier.
Definition at line 110 of file Cell.hpp.
Referenced by Cell(), ResetMaxCellId(), and serialize().
double Cell::mDeathTime [protected] |
When the cell will/did die.
Definition at line 113 of file Cell.hpp.
Referenced by GetTimeUntilDeath(), IsDead(), serialize(), and StartApoptosis().
double Cell::mStartOfApoptosisTime [protected] |
When the cell was commanded to start apoptosis.
Definition at line 116 of file Cell.hpp.
Referenced by GetStartOfApoptosisTime(), serialize(), and StartApoptosis().
double Cell::mApoptosisTime [protected] |
The time it takes for a cell to fully undergo apoptosis. Has units of hours.
Definition at line 119 of file Cell.hpp.
Referenced by GetApoptosisTime(), serialize(), SetApoptosisTime(), and StartApoptosis().
bool Cell::mUndergoingApoptosis [protected] |
Whether the cell is currently in apoptosis - don't divide.
Definition at line 122 of file Cell.hpp.
Referenced by GetTimeUntilDeath(), HasApoptosisBegun(), IsDead(), ReadyToDivide(), serialize(), and StartApoptosis().
bool Cell::mIsDead [protected] |
Whether the cell is dead or not (they exist in the CellPopulation until they are removed by AbstractCellPopulation::RemoveDeadCells().
Definition at line 128 of file Cell.hpp.
Referenced by IsDead(), Kill(), serialize(), and ~Cell().
bool Cell::mIsLogged [protected] |
Whether the cell is being tracked specially.
Definition at line 131 of file Cell.hpp.
Referenced by IsLogged(), serialize(), and SetLogged().