00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2010 00004 00005 University of Oxford means the Chancellor, Masters and Scholars of the 00006 University of Oxford, having an administrative office at Wellington 00007 Square, Oxford OX1 2JD, UK. 00008 00009 This file is part of Chaste. 00010 00011 Chaste is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as published 00013 by the Free Software Foundation, either version 2.1 of the License, or 00014 (at your option) any later version. 00015 00016 Chaste is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00019 License for more details. The offer of Chaste under the terms of the 00020 License is subject to the License being interpreted in accordance with 00021 English Law and subject to any action against the University of Oxford 00022 being under the jurisdiction of the English Courts. 00023 00024 You should have received a copy of the GNU Lesser General Public License 00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>. 00026 00027 */ 00028 #ifndef ABSTRACTCELLCYCLEMODEL_HPP_ 00029 #define ABSTRACTCELLCYCLEMODEL_HPP_ 00030 00031 #include "UblasIncludes.hpp" 00032 #include "ChasteSerialization.hpp" 00033 #include "ClassIsAbstract.hpp" 00034 #include <boost/serialization/base_object.hpp> 00035 00036 #include <vector> 00037 00038 #include "CellProliferativeTypes.hpp" 00039 #include "CellCyclePhases.hpp" 00040 #include "SimulationTime.hpp" 00041 #include "TissueConfig.hpp" 00042 #include "TissueCell.hpp" 00043 00044 class TissueCell; // Circular definition (cells need to know about cycle models and vice-versa) 00045 00046 00051 class AbstractCellCycleModel 00052 { 00053 private: 00054 00056 friend class boost::serialization::access; 00068 template<class Archive> 00069 void serialize(Archive & archive, const unsigned int version) 00070 { 00071 // Make sure the SimulationTime and TissueConfig singletons get saved too 00072 SimulationTime* p_time = SimulationTime::Instance(); 00073 archive & *p_time; 00074 archive & p_time; 00075 TissueConfig* p_params = TissueConfig::Instance(); 00076 archive & *p_params; 00077 archive & p_params; 00078 00079 // DO NOT archive & mpCell; -- The CellCycleModel is only ever archived from the Cell 00080 // which knows this and it is handled in the load_construct of TissueCell. 00081 archive & mBirthTime; 00082 archive & mCurrentCellCyclePhase; 00083 archive & mG1Duration; 00084 archive & mReadyToDivide; 00085 archive & mDimension; 00086 } 00087 00094 AbstractCellCycleModel & operator = (const AbstractCellCycleModel& rOtherModel); 00095 00096 protected: 00097 00099 TissueCell* mpCell; 00100 00105 double mBirthTime; 00106 00108 CellCyclePhase mCurrentCellCyclePhase; 00109 00114 double mG1Duration; 00115 00119 bool mReadyToDivide; 00120 00124 unsigned mDimension; 00125 00126 public: 00127 00132 AbstractCellCycleModel(); 00133 00137 virtual ~AbstractCellCycleModel(); 00138 00148 void SetCell(TissueCell* pCell); 00149 00161 virtual void Initialise() 00162 {} 00163 00176 virtual void InitialiseDaughterCell() 00177 {} 00178 00182 TissueCell* GetCell(); 00183 00192 virtual void SetBirthTime(double birthTime); 00193 00199 void SetDimension(unsigned dimension); 00200 00204 unsigned GetDimension(); 00205 00209 double GetBirthTime() const; 00210 00214 double GetAge(); 00215 00224 bool ReadyToDivide(); 00225 00232 virtual void UpdateCellCyclePhase()=0; 00233 00242 virtual void ResetForDivision(); 00243 00275 virtual AbstractCellCycleModel* CreateCellCycleModel()=0; 00276 00280 CellCyclePhase GetCurrentCellCyclePhase(); 00281 00285 virtual double GetG1Duration(); 00286 00290 virtual double GetSDuration(); 00291 00295 virtual double GetG2Duration(); 00296 00300 virtual double GetMDuration(); 00301 00306 virtual double GetAverageTransitCellCycleTime(); 00307 00312 virtual double GetAverageStemCellCycleTime(); 00313 00317 virtual bool CanCellTerminallyDifferentiate(); 00318 }; 00319 00320 00321 CLASS_IS_ABSTRACT(AbstractCellCycleModel) 00322 00323 00324 #endif /*ABSTRACTCELLCYCLEMODEL_HPP_*/