9 #include "personaleventlist.h"
44 void setPersonID(int64_t
id);
45 int64_t getPersonID()
const {
return m_personID; }
51 std::string
getName()
const {
return m_name; }
57 double getAgeAt(
double t0)
const {
double age = t0 - m_dateOfBirth; assert(age >= 0);
return age; }
60 bool hasDied()
const {
return ! (m_timeOfDeath < 0); }
63 void setTimeOfDeath(
double t) { assert(m_timeOfDeath < 0); m_timeOfDeath = t; }
69 void setListIndex(
int i) { m_listIndex = i; }
70 int getListIndex()
const {
return m_listIndex; }
74 double m_dateOfBirth, m_timeOfDeath;
80 #endif // PERSONBASE_H
The person is a man.
Definition: personbase.h:30
double getAgeAt(double t0) const
Returns the age of the person at time t0.
Definition: personbase.h:57
Gender getGender() const
Returns the gender of the person as set at construction time.
Definition: personbase.h:48
bool hasDied() const
Returns a flag indicating if the person has died.
Definition: personbase.h:60
std::string getName() const
Returns a name with which the person can be identified.
Definition: personbase.h:51
This class provides functions for a population-based simulation using the modified Next Reaction Meth...
Definition: population.h:77
The person is a woman.
Definition: personbase.h:32
Gender
The gender of a person.
Definition: personbase.h:27
double getDateOfBirth() const
Returns the time at which the person was born, as specified in the constructor.
Definition: personbase.h:54
PersonBase(Gender g, double dateOfBirth)
Create a new person of gender g and which was born at the specified time in the simulation.
Definition: personbase.cpp:6
This is the base class for a person in a population-based simulation that used the Population class...
Definition: personbase.h:23
void setTimeOfDeath(double t)
Marks the person as deceased and stores the specified time of death.
Definition: personbase.h:63