AbstractCellCycleModel.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2009
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 <boost/serialization/access.hpp>
00033 #include <boost/serialization/is_abstract.hpp>
00034 #include <boost/serialization/base_object.hpp>
00035 
00036 #include <vector>
00037 
00038 #include "CellTypes.hpp"
00039 #include "CellCyclePhases.hpp"
00040 #include "SimulationTime.hpp"
00041 #include "TissueConfig.hpp"
00042 #include "TissueCell.hpp"
00043 
00044 // Needs to be included last
00045 #include <boost/serialization/export.hpp>
00046 
00047 class TissueCell; // Circular definition (cells need to know about cycle models and vice-versa)
00048 
00049 
00054 class AbstractCellCycleModel
00055 {
00056 private:
00057 
00059     friend class boost::serialization::access;
00071     template<class Archive>
00072     void serialize(Archive & archive, const unsigned int version)
00073     {
00074         // Make sure the simulation and cancer parameters get saved too
00075         SimulationTime *p_time = SimulationTime::Instance();
00076         archive & *p_time;
00077         archive & p_time;
00078         TissueConfig *p_params = TissueConfig::Instance();
00079         archive & *p_params;
00080         archive & p_params;
00081 
00082         // DO NOT archive & mpCell; -- The CellCycleModel is only ever archived from the Cell
00083         // which knows this and it is handled in the load_construct of TissueCell.
00084         archive & mBirthTime;
00085         archive & mCurrentCellCyclePhase;
00086         archive & mG1Duration;
00087         archive & mReadyToDivide;
00088     }
00089 
00096     AbstractCellCycleModel & operator = (const AbstractCellCycleModel& rOtherModel);
00097 
00098 protected:
00099 
00101     TissueCell *mpCell;
00102 
00107     double mBirthTime;
00108 
00110     CellCyclePhase mCurrentCellCyclePhase;
00111 
00116     double mG1Duration;
00117 
00121     bool mReadyToDivide;
00122 
00123 public:
00124 
00129     AbstractCellCycleModel();
00130 
00134     virtual ~AbstractCellCycleModel();
00135 
00145     void SetCell(TissueCell* pCell);
00146 
00158     virtual void Initialise()
00159     {}
00160 
00173     virtual void InitialiseDaughterCell()
00174     {}
00175 
00179     TissueCell* GetCell();
00180 
00189     virtual void SetBirthTime(double birthTime);
00190 
00194     double GetBirthTime() const;
00195 
00199     double GetAge();
00200 
00209     bool ReadyToDivide();
00210 
00217     virtual void UpdateCellCyclePhase()=0;
00218 
00227     virtual void ResetForDivision();
00228 
00260     virtual AbstractCellCycleModel* CreateCellCycleModel()=0;
00261 
00265     CellCyclePhase GetCurrentCellCyclePhase();
00266 
00270     virtual double GetG1Duration();
00271 
00275     virtual double GetSDuration();
00276 
00280     virtual double GetG2Duration();
00281 
00285     virtual double GetMDuration();
00286 
00287 };
00288 
00289 
00290 BOOST_IS_ABSTRACT(AbstractCellCycleModel)
00291 
00292 
00293 #endif /*ABSTRACTCELLCYCLEMODEL_HPP_*/

Generated on Tue Aug 4 16:10:21 2009 for Chaste by  doxygen 1.5.5