Chaste  Release::2018.1
AbstractCellCycleModel.hpp
1 /*
2 
3 Copyright (c) 2005-2018, University of Oxford.
4 All rights reserved.
5 
6 University of Oxford means the Chancellor, Masters and Scholars of the
7 University of Oxford, having an administrative office at Wellington
8 Square, Oxford OX1 2JD, UK.
9 
10 This file is part of Chaste.
11 
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright notice,
15  this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright notice,
17  this list of conditions and the following disclaimer in the documentation
18  and/or other materials provided with the distribution.
19  * Neither the name of the University of Oxford nor the names of its
20  contributors may be used to endorse or promote products derived from this
21  software without specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 */
35 
36 #ifndef ABSTRACTCELLCYCLEMODEL_HPP_
37 #define ABSTRACTCELLCYCLEMODEL_HPP_
38 
39 #include "ChasteSerialization.hpp"
40 #include "ClassIsAbstract.hpp"
41 #include "Identifiable.hpp"
42 
43 #include <boost/serialization/base_object.hpp>
44 
45 #include <vector>
46 
47 #include "OutputFileHandler.hpp"
48 #include "CellCyclePhases.hpp"
49 #include "SimulationTime.hpp"
50 #include "Cell.hpp"
51 
52 class Cell; // Circular definition (cells need to know about cycle models and vice-versa)
53 typedef boost::shared_ptr<Cell> CellPtr;
54 
62 {
63 private:
64 
73  template<class Archive>
74  void serialize(Archive & archive, const unsigned int version)
75  {
76  // Make sure the SimulationTime singleton gets saved too
78  archive & p_time_wrapper;
79 
80  // DO NOT archive & mpCell; -- The CellCycleModel is only ever archived from the Cell
81  // which knows this and it is handled in the load_construct of Cell.
82  archive & mBirthTime;
83  archive & mReadyToDivide;
84  archive & mDimension;
85  }
86 
95 
96 protected:
97 
99  CellPtr mpCell;
100 
105  double mBirthTime;
106 
111 
115  unsigned mDimension;
116 
131 
132 public:
133 
139 
145  virtual ~AbstractCellCycleModel();
146 
156  void SetCell(CellPtr pCell);
157 
169  virtual void Initialise();
170 
183  virtual void InitialiseDaughterCell();
184 
188  CellPtr GetCell();
189 
198  virtual void SetBirthTime(double birthTime);
199 
205  void SetDimension(unsigned dimension);
206 
210  unsigned GetDimension() const;
211 
215  double GetBirthTime() const;
216 
220  double GetAge();
221 
233  virtual bool ReadyToDivide()=0;
234 
243  virtual void ResetForDivision();
244 
265 
269  virtual bool CanCellTerminallyDifferentiate();
270 
279  virtual double GetAverageTransitCellCycleTime()=0;
280 
289  virtual double GetAverageStemCellCycleTime()=0;
290 
297  void OutputCellCycleModelInfo(out_stream& rParamsFile);
298 
307  virtual void OutputCellCycleModelParameters(out_stream& rParamsFile)=0;
308 };
309 
311 
312 #endif /*ABSTRACTCELLCYCLEMODEL_HPP_*/
Definition: Cell.hpp:89
virtual void SetBirthTime(double birthTime)
virtual double GetAverageStemCellCycleTime()=0
void OutputCellCycleModelInfo(out_stream &rParamsFile)
AbstractCellCycleModel & operator=(const AbstractCellCycleModel &)
#define CLASS_IS_ABSTRACT(T)
static SimulationTime * Instance()
virtual bool CanCellTerminallyDifferentiate()
virtual double GetAverageTransitCellCycleTime()=0
virtual bool ReadyToDivide()=0
void SetDimension(unsigned dimension)
friend class boost::serialization::access
void serialize(Archive &archive, const unsigned int version)
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)=0
SerializableSingleton< SINGLETON_CLASS > * GetSerializationWrapper() const
virtual AbstractCellCycleModel * CreateCellCycleModel()=0