Cell Class Reference

#include <Cell.hpp>

Inherits boost::noncopyable, and boost::enable_shared_from_this< Cell >.

Collaboration diagram for Cell:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Cell (boost::shared_ptr< AbstractCellProperty > pMutationState, AbstractCellCycleModel *pCellCycleModel, bool archiving=false, CellPropertyCollection cellPropertyCollection=CellPropertyCollection())
 ~Cell ()
boost::shared_ptr
< AbstractCellProliferativeType
GetCellProliferativeType () const
void SetCellProliferativeType (boost::shared_ptr< AbstractCellProperty > pProliferativeType)
void SetBirthTime (double birthTime)
void SetCellCycleModel (AbstractCellCycleModel *pCellCycleModel)
AbstractCellCycleModelGetCellCycleModel () 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
boost::shared_ptr< CellDataGetCellData () const
void SetMutationState (boost::shared_ptr< AbstractCellProperty > pMutationState)
CellPropertyCollectionrGetCellPropertyCollection ()
const CellPropertyCollectionrGetCellPropertyCollection () 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 (boost::shared_ptr< AbstractCellProperty > pCellAncestor)
unsigned GetAncestor () const
unsigned GetCellId () const

Protected Attributes

CellPropertyCollection mCellPropertyCollection
AbstractCellCycleModelmpCellCycleModel
double mDeathTime
double mStartOfApoptosisTime
double mApoptosisTime
bool mUndergoingApoptosis
bool mIsDead
bool mIsLogged

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)

Private Attributes

bool mCanDivide

Friends

class boost::serialization::access

Detailed Description

Cell is the basic container for all the biological information about a cell. It contains the cell-cycle model and all other biological properties such as mutation state, cell type, whether it is undergoing apoptosis or not.

This class should not store any spatial information - cells are linked to space by the AbstractCellPopulation subclasses.

Definition at line 75 of file Cell.hpp.


Constructor & Destructor Documentation

Cell::Cell ( boost::shared_ptr< AbstractCellProperty pMutationState,
AbstractCellCycleModel pCellCycleModel,
bool  archiving = false,
CellPropertyCollection  cellPropertyCollection = CellPropertyCollection() 
)

Create a new cell.

Parameters:
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 58 of file Cell.cpp.

References CellPropertyCollection::AddProperty(), CellPropertyCollection::Begin(), CellPropertyCollection::End(), EXCEPTION, CellPropertyCollection::HasProperty(), CellPropertyCollection::HasPropertyType(), CellPropertyRegistry::Instance(), SimulationTime::Instance(), MAKE_PTR, mCellPropertyCollection, mpCellCycleModel, and AbstractCellCycleModel::SetCell().

Referenced by Divide().

Cell::~Cell (  ) 

Destructor, which frees the memory allocated for our cell-cycle model.

Definition at line 134 of file Cell.cpp.

References Kill(), mIsDead, and mpCellCycleModel.


Member Function Documentation

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).

Parameters:
rProperty the property to add

Definition at line 260 of file Cell.cpp.

References CellPropertyCollection::AddProperty(), CellPropertyCollection::HasProperty(), and mCellPropertyCollection.

Referenced by SetAncestor(), SetCellProliferativeType(), SetMutationState(), and StartApoptosis().

CellPtr Cell::Divide (  ) 
double Cell::GetAge (  )  const
Returns:
the cell's age from its cell-cycle model.

Definition at line 193 of file Cell.cpp.

References AbstractCellCycleModel::GetAge(), and mpCellCycleModel.

unsigned Cell::GetAncestor (  )  const
Returns:
The ancestor object, inherited from parents or set using the method above, used for monoclonality experiments.

Definition at line 378 of file Cell.cpp.

References CellPropertyCollection::GetPropertiesType(), CellPropertyCollection::GetProperty(), CellPropertyCollection::GetSize(), mCellPropertyCollection, and UNSIGNED_UNSET.

double Cell::GetApoptosisTime (  )  const
Returns:
mApoptosisTime

Definition at line 311 of file Cell.cpp.

References mApoptosisTime.

double Cell::GetBirthTime (  )  const
Returns:
the cell's birth time from its cell-cycle model.

Definition at line 198 of file Cell.cpp.

References AbstractCellCycleModel::GetBirthTime(), and mpCellCycleModel.

AbstractCellCycleModel * Cell::GetCellCycleModel (  )  const
Returns:
a pointer to the Cell's cell-cycle model.

Definition at line 183 of file Cell.cpp.

References mpCellCycleModel.

boost::shared_ptr< CellData > Cell::GetCellData (  )  const

Get the CellData associated with the cell.

Returns:
a pointer to the cell data

Definition at line 237 of file Cell.cpp.

References CellPropertyCollection::GetPropertiesType(), CellPropertyCollection::GetProperty(), CellPropertyCollection::GetSize(), and mCellPropertyCollection.

Referenced by Divide().

unsigned Cell::GetCellId (  )  const
boost::shared_ptr< AbstractCellProliferativeType > Cell::GetCellProliferativeType (  )  const
boost::shared_ptr< AbstractCellMutationState > Cell::GetMutationState (  )  const
Returns:
the cell's current mutation state.

Definition at line 222 of file Cell.cpp.

References CellPropertyCollection::GetPropertiesType(), CellPropertyCollection::GetProperty(), CellPropertyCollection::GetSize(), and mCellPropertyCollection.

Referenced by Divide(), and SetMutationState().

double Cell::GetStartOfApoptosisTime (  )  const
Returns:
the time at which apoptosis was commanded to start.

Definition at line 306 of file Cell.cpp.

References mStartOfApoptosisTime.

double Cell::GetTimeUntilDeath (  )  const
Returns:
How long until the cell dies (if it is in apoptosis, throws an exception if not)

Definition at line 322 of file Cell.cpp.

References EXCEPTION, SimulationTime::GetTime(), SimulationTime::Instance(), mDeathTime, and mUndergoingApoptosis.

bool Cell::HasApoptosisBegun (  )  const
Returns:
whether the cell is undergoing apoptosis or not.

Definition at line 301 of file Cell.cpp.

References mUndergoingApoptosis.

template<typename CLASS >
bool Cell::HasCellProperty (  )  const [inline]
Returns:
whether the cell property collection contains a property that has the exact type CLASS. Just calls mCellPropertyCollection.HasProperty().

Definition at line 291 of file Cell.hpp.

References CellPropertyCollection::HasProperty(), and mCellPropertyCollection.

void Cell::InitialiseCellCycleModel (  ) 

Calls Initialise on the cell-cycle model associated with this cell.

Definition at line 188 of file Cell.cpp.

References AbstractCellCycleModel::Initialise(), and mpCellCycleModel.

bool Cell::IsDead (  ) 
Returns:
whether the cell is dead or undergoing apoptosis.

Definition at line 332 of file Cell.cpp.

References SimulationTime::Instance(), Kill(), mApoptosisTime, mDeathTime, mIsDead, and mUndergoingApoptosis.

Referenced by Divide(), ReadyToDivide(), and StartApoptosis().

bool Cell::IsLogged (  ) 
Returns:
Whether the cell is being tracked.

Definition at line 275 of file Cell.cpp.

References mIsLogged.

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 345 of file Cell.cpp.

References CellPropertyCollection::Begin(), CellPropertyCollection::End(), mCellPropertyCollection, and mIsDead.

Referenced by IsDead(), and ~Cell().

bool Cell::ReadyToDivide (  ) 
Returns:
whether this cell is ready to divide at the present simulation time. MUST be called before calling Divide().

Definition at line 404 of file Cell.cpp.

References IsDead(), mCanDivide, mpCellCycleModel, mUndergoingApoptosis, and AbstractCellCycleModel::ReadyToDivide().

template<typename CLASS >
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 264 of file Cell.hpp.

References CellPropertyCollection::Begin(), CellPropertyCollection::End(), mCellPropertyCollection, and CellPropertyCollection::RemoveProperty().

const CellPropertyCollection & Cell::rGetCellPropertyCollection (  )  const
Returns:
reference to mCellPropertyCollection (used in archiving).

Definition at line 255 of file Cell.cpp.

References mCellPropertyCollection.

CellPropertyCollection & Cell::rGetCellPropertyCollection (  ) 
Returns:
reference to mCellPropertyCollection.

Definition at line 250 of file Cell.cpp.

References mCellPropertyCollection.

template<class Archive >
void Cell::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
archive the archive
version the current version of this class

Definition at line 91 of file Cell.hpp.

References mApoptosisTime, mCanDivide, mDeathTime, mIsDead, mIsLogged, mpCellCycleModel, mStartOfApoptosisTime, and mUndergoingApoptosis.

void Cell::SetAncestor ( boost::shared_ptr< AbstractCellProperty pCellAncestor  ) 

Give the Cell an index which it passes to its children.

Parameters:
pCellAncestor the cell's ancestor

Definition at line 357 of file Cell.cpp.

References AddCellProperty(), EXCEPTION, CellPropertyCollection::GetPropertiesType(), CellPropertyCollection::GetSize(), and mCellPropertyCollection.

void Cell::SetApoptosisTime ( double  apoptosisTime  ) 

Set mApoptosisTime.

Parameters:
apoptosisTime the new value of mApoptosisTime

Definition at line 316 of file Cell.cpp.

References mApoptosisTime.

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

Parameters:
birthTime The time the cell was born (in hours)

Definition at line 203 of file Cell.cpp.

References mpCellCycleModel, and AbstractCellCycleModel::SetBirthTime().

void Cell::SetCellCycleModel ( AbstractCellCycleModel pCellCycleModel  ) 

Change the cell-cycle model used. This takes effect immediately.

Parameters:
pCellCycleModel pointer to the cell-cycle model to use

Definition at line 173 of file Cell.cpp.

References mpCellCycleModel, and AbstractCellCycleModel::SetCell().

void Cell::SetCellProliferativeType ( boost::shared_ptr< AbstractCellProperty pProliferativeType  ) 

Set the cell's proliferative type.

Parameters:
pProliferativeType the cell's new proliferative type

Definition at line 143 of file Cell.cpp.

References AddCellProperty(), EXCEPTION, GetCellProliferativeType(), mCellPropertyCollection, and CellPropertyCollection::RemoveProperty().

void Cell::SetLogged (  ) 

Sets a flag to perform special output on this cell only.

Definition at line 270 of file Cell.cpp.

References mIsLogged.

void Cell::SetMutationState ( boost::shared_ptr< AbstractCellProperty pMutationState  ) 

Set the cell's mutation state.

Parameters:
pMutationState the cell's new mutation state

Definition at line 208 of file Cell.cpp.

References AddCellProperty(), EXCEPTION, GetMutationState(), mCellPropertyCollection, and CellPropertyCollection::RemoveProperty().

void Cell::StartApoptosis ( bool  setDeathTime = true  ) 

Make the cell enter apoptosis and sets mDeathTime using the apoptosis time as defined by mApoptosisTime.

Parameters:
setDeathTime whether we tell the cell exactly when to die (defaults to true)

Definition at line 280 of file Cell.cpp.

References AddCellProperty(), EXCEPTION, CellPropertyRegistry::Get(), CellPropertyCollection::GetCellPropertyRegistry(), SimulationTime::GetTime(), SimulationTime::Instance(), IsDead(), mApoptosisTime, mCellPropertyCollection, mDeathTime, mStartOfApoptosisTime, and mUndergoingApoptosis.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Definition at line 83 of file Cell.hpp.


Member Data Documentation

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 Divide(), GetApoptosisTime(), IsDead(), serialize(), SetApoptosisTime(), and StartApoptosis().

Caches the result of ReadyToDivide() so Divide() can look at it.

Definition at line 80 of file Cell.hpp.

Referenced by Divide(), ReadyToDivide(), 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().

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().

When the cell was commanded to start apoptosis.

Definition at line 116 of file Cell.hpp.

Referenced by GetStartOfApoptosisTime(), serialize(), and StartApoptosis().

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().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2