TissueCell Class Reference

#include <TissueCell.hpp>

Collaboration diagram for TissueCell:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TissueCell (CellType cellType, CellMutationState mutationState, AbstractCellCycleModel *pCellCycleModel, bool archiving=false)
 ~TissueCell ()
 TissueCell (const TissueCell &rOtherCell)
TissueCelloperator= (const TissueCell &rOtherCell)
void SetBirthTime (double birthTime)
void SetCellCycleModel (AbstractCellCycleModel *pCellCycleModel)
AbstractCellCycleModelGetCellCycleModel () const
void InitialiseCellCycleModel ()
double GetAge () const
double GetBirthTime () const
double GetStartOfApoptosisTime () const
CellType GetCellType () const
void SetCellType (CellType cellType)
CellMutationState GetMutationState () const
void SetMutationState (CellMutationState mutationState)
bool ReadyToDivide ()
TissueCell Divide ()
void StartApoptosis (bool setDeathTime=true)
void Kill ()
bool HasApoptosisBegun () const
double TimeUntilDeath () 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 Member Functions

void CommonCopy (const TissueCell &rOtherCell)

Protected Attributes

CellType mCellType
CellMutationState mMutationState
AbstractCellCycleModelmpCellCycleModel
unsigned mAncestor
unsigned mCellId
double mDeathTime
double mStartOfApoptosisTime
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


Detailed Description

Tissue 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 - TissueCells are linked to space by the Tissue classes.

Definition at line 49 of file TissueCell.hpp.


Constructor & Destructor Documentation

TissueCell::TissueCell ( CellType  cellType,
CellMutationState  mutationState,
AbstractCellCycleModel pCellCycleModel,
bool  archiving = false 
)

Create a new tissue cell.

Parameters:
cellType the type of cell this is
mutationState 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!

Definition at line 33 of file TissueCell.cpp.

References SimulationTime::Instance(), mCellId, mMaxCellId, mpCellCycleModel, and AbstractCellCycleModel::SetCell().

Referenced by Divide().

TissueCell::~TissueCell (  ) 

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

Definition at line 106 of file TissueCell.cpp.

References mpCellCycleModel.

TissueCell::TissueCell ( const TissueCell rOtherCell  ) 

Create a new tissue cell that is a copy of an existing cell

Parameters:
rOtherCell An existing TissueCell

Definition at line 89 of file TissueCell.cpp.

References CommonCopy().


Member Function Documentation

template<class Archive>
void TissueCell::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 65 of file TissueCell.hpp.

References mAncestor, mCanDivide, mCellId, mCellType, mDeathTime, mIsDead, mIsLogged, mMaxCellId, mMutationState, mpCellCycleModel, mStartOfApoptosisTime, and mUndergoingApoptosis.

void TissueCell::CommonCopy ( const TissueCell rOtherCell  )  [protected]

Contains code common to both the copy constructor and operator=.

Parameters:
rOtherCell An existing TissueCell

Definition at line 65 of file TissueCell.cpp.

References AbstractCellCycleModel::CreateCellCycleModel(), mAncestor, mCanDivide, mCellId, mCellType, mDeathTime, mIsDead, mIsLogged, mMutationState, mpCellCycleModel, mStartOfApoptosisTime, mUndergoingApoptosis, and AbstractCellCycleModel::SetCell().

Referenced by operator=(), and TissueCell().

TissueCell & TissueCell::operator= ( const TissueCell rOtherCell  ) 

Copy all the attributes of one cell to another.

Parameters:
rOtherCell An existing TissueCell

Definition at line 95 of file TissueCell.cpp.

References CommonCopy(), and mpCellCycleModel.

void TissueCell::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 147 of file TissueCell.cpp.

References mpCellCycleModel, and AbstractCellCycleModel::SetBirthTime().

Referenced by AbstractCellsGenerator< DIM >::GenerateBasic(), AbstractCellsGenerator< DIM >::GenerateForCrypt(), and FixedDurationGenerationBasedCellCycleModelCellsGenerator< DIM >::GenerateGivenLocationIndices().

void TissueCell::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 112 of file TissueCell.cpp.

References mpCellCycleModel, and AbstractCellCycleModel::SetCell().

AbstractCellCycleModel * TissueCell::GetCellCycleModel (  )  const

void TissueCell::InitialiseCellCycleModel (  ) 

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

Definition at line 129 of file TissueCell.cpp.

References AbstractCellCycleModel::Initialise(), and mpCellCycleModel.

Referenced by AbstractCellsGenerator< DIM >::GenerateForCrypt().

double TissueCell::GetAge (  )  const

Get the cell's age from its cell cycle model.

Definition at line 135 of file TissueCell.cpp.

References AbstractCellCycleModel::GetAge(), and mpCellCycleModel.

Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), and AbstractTissue< DIM >::GenerateCellResults().

double TissueCell::GetBirthTime (  )  const

Get the cell's birth time from its cell cycle model.

Definition at line 141 of file TissueCell.cpp.

References AbstractCellCycleModel::GetBirthTime(), and mpCellCycleModel.

double TissueCell::GetStartOfApoptosisTime (  )  const

Get the time at which apoptosis was commanded to start.

Definition at line 217 of file TissueCell.cpp.

References mStartOfApoptosisTime.

CellType TissueCell::GetCellType (  )  const

void TissueCell::SetCellType ( CellType  cellType  ) 

CellMutationState TissueCell::GetMutationState (  )  const

void TissueCell::SetMutationState ( CellMutationState  mutationState  ) 

Set method for mMutationState.

Parameters:
mutationState the cell's mutation state

Definition at line 165 of file TissueCell.cpp.

References mMutationState.

bool TissueCell::ReadyToDivide (  ) 

Determine if this cell is ready to divide at the current simulation time. MUST be called before calling Divide().

Definition at line 271 of file TissueCell.cpp.

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

TissueCell TissueCell::Divide (  ) 

Divide this cell to produce a daughter cell. ReadyToDivide MUST have been called at the current time, and returned true.

Returns:
the new daughter cell

Definition at line 285 of file TissueCell.cpp.

References AbstractCellCycleModel::CreateCellCycleModel(), GetAncestor(), GetCellCycleModel(), AbstractCellCycleModel::InitialiseDaughterCell(), IsDead(), mCanDivide, mCellType, mMutationState, mpCellCycleModel, AbstractCellCycleModel::ResetForDivision(), SetAncestor(), and TissueCell().

void TissueCell::StartApoptosis ( bool  setDeathTime = true  ) 

Makes the cell enter apoptosis and sets mDeathTime using the apoptosis time from the cancer parameters.

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

Definition at line 189 of file TissueCell.cpp.

References TissueConfig::GetApoptosisTime(), SimulationTime::GetTime(), TissueConfig::Instance(), SimulationTime::Instance(), IsDead(), mCellType, mDeathTime, mStartOfApoptosisTime, and mUndergoingApoptosis.

Referenced by RandomCellKiller< DIM >::TestAndLabelSingleCellForApoptosis().

void TissueCell::Kill (  ) 

This labels the cell as dead, it does not delete the cell, it remains in the Tissue until AbstractTissue::RemoveDeadCells() is called.

Definition at line 246 of file TissueCell.cpp.

References mIsDead.

Referenced by IsDead().

bool TissueCell::HasApoptosisBegun (  )  const

double TissueCell::TimeUntilDeath (  )  const

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

Definition at line 222 of file TissueCell.cpp.

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

Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes().

bool TissueCell::IsDead (  ) 

Return whether the cell is dead or undergoing apoptosis.

Definition at line 233 of file TissueCell.cpp.

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

Referenced by MeshBasedTissue< DIM >::CheckTissueCellPointers(), Divide(), ReadyToDivide(), and StartApoptosis().

void TissueCell::SetLogged (  ) 

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

Definition at line 177 of file TissueCell.cpp.

References mIsLogged.

bool TissueCell::IsLogged (  ) 

Returns:
Whether the cell is being tracked.

Definition at line 183 of file TissueCell.cpp.

References mIsLogged.

void TissueCell::SetAncestor ( unsigned  ancestorIndex  ) 

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

Parameters:
ancestorIndex the cell's ancestor index

Definition at line 251 of file TissueCell.cpp.

References mAncestor.

Referenced by Divide().

unsigned TissueCell::GetAncestor (  )  const

Returns:
The ancestor index, inherited from parents or set using the method above, used for monoclonality experiments.

Definition at line 256 of file TissueCell.cpp.

References mAncestor.

Referenced by Divide(), and AbstractTissue< DIM >::GenerateCellResults().

unsigned TissueCell::GetCellId (  )  const

Returns:
The cell identifier.

Definition at line 261 of file TissueCell.cpp.

References mCellId.

void TissueCell::ResetMaxCellId (  )  [static]

Reset the current max ID.

Definition at line 266 of file TissueCell.cpp.

References mMaxCellId.


Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 57 of file TissueCell.hpp.


Member Data Documentation

bool TissueCell::mCanDivide [private]

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

Definition at line 54 of file TissueCell.hpp.

Referenced by CommonCopy(), Divide(), ReadyToDivide(), and serialize().

CellType TissueCell::mCellType [protected]

The cell type - defined in CellTypes.hpp

Definition at line 89 of file TissueCell.hpp.

Referenced by CommonCopy(), Divide(), GetCellType(), ReadyToDivide(), serialize(), SetCellType(), and StartApoptosis().

CellMutationState TissueCell::mMutationState [protected]

The cell's mutation state - defined in CellMutationStates.hpp

Definition at line 92 of file TissueCell.hpp.

Referenced by CommonCopy(), Divide(), GetMutationState(), serialize(), and SetMutationState().

unsigned TissueCell::mAncestor [protected]

An index which is inherited by all children of this cell

Definition at line 98 of file TissueCell.hpp.

Referenced by CommonCopy(), GetAncestor(), serialize(), and SetAncestor().

unsigned TissueCell::mCellId [protected]

An identifier which is unique to this cell

Definition at line 101 of file TissueCell.hpp.

Referenced by CommonCopy(), GetCellId(), serialize(), and TissueCell().

unsigned TissueCell::mMaxCellId = 0 [static, protected]

maximum cell identifier

Definition at line 104 of file TissueCell.hpp.

Referenced by ResetMaxCellId(), serialize(), and TissueCell().

double TissueCell::mDeathTime [protected]

When the cell will/did die

Definition at line 107 of file TissueCell.hpp.

Referenced by CommonCopy(), IsDead(), serialize(), StartApoptosis(), and TimeUntilDeath().

When the cell was commanded to start apoptosis

Definition at line 110 of file TissueCell.hpp.

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

Whether the cell is currently in apoptosis - don't divide

Definition at line 113 of file TissueCell.hpp.

Referenced by CommonCopy(), HasApoptosisBegun(), IsDead(), ReadyToDivide(), serialize(), StartApoptosis(), and TimeUntilDeath().

bool TissueCell::mIsDead [protected]

Whether the cell is dead or not (they exist in the Tissue until they are removed by AbstractTissue::RemoveDeadCells()

Definition at line 119 of file TissueCell.hpp.

Referenced by CommonCopy(), IsDead(), Kill(), and serialize().

bool TissueCell::mIsLogged [protected]

Whether the cell is being tracked specially.

Definition at line 122 of file TissueCell.hpp.

Referenced by CommonCopy(), IsLogged(), serialize(), and SetLogged().


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

Generated on Tue Aug 4 16:11:49 2009 for Chaste by  doxygen 1.5.5