Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
AbstractCellCycleModel.hpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF 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
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
52class Cell; // Circular definition (cells need to know about cycle models and vice-versa)
53typedef boost::shared_ptr<Cell> CellPtr;
54
62{
63private:
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
96protected:
97
99 CellPtr mpCell;
100
106
111
115 unsigned mDimension;
116
131
132public:
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
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_*/
#define CLASS_IS_ABSTRACT(T)
virtual void SetBirthTime(double birthTime)
virtual AbstractCellCycleModel * CreateCellCycleModel()=0
AbstractCellCycleModel & operator=(const AbstractCellCycleModel &)
virtual bool ReadyToDivide()=0
void SetDimension(unsigned dimension)
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)=0
virtual double GetAverageTransitCellCycleTime()=0
virtual bool CanCellTerminallyDifferentiate()
void serialize(Archive &archive, const unsigned int version)
friend class boost::serialization::access
virtual double GetAverageStemCellCycleTime()=0
void OutputCellCycleModelInfo(out_stream &rParamsFile)
Definition Cell.hpp:92
SerializableSingleton< SINGLETON_CLASS > * GetSerializationWrapper() const
static SimulationTime * Instance()