9 #include "personaleventlist.h"
46 void setPersonID(int64_t
id);
47 int64_t getPersonID()
const {
return m_personID; }
53 std::string
getName()
const {
return m_name; }
59 double getAgeAt(
double t0)
const {
double age = t0 - m_dateOfBirth; assert(age >= 0);
return age; }
62 bool hasDied()
const {
return ! (m_timeOfDeath < 0); }
65 void setTimeOfDeath(
double t) { assert(m_timeOfDeath < 0); m_timeOfDeath = t; }
74 void setListIndex(
int i) { m_listIndex = i; }
75 int getListIndex()
const {
return m_listIndex; }
79 double m_dateOfBirth, m_timeOfDeath;
85 class GlobalEventDummyPerson :
public PersonBase
88 GlobalEventDummyPerson() :
PersonBase(GlobalEventDummy, -11111) { }
89 ~GlobalEventDummyPerson() { }
92 #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:59
Gender getGender() const
Returns the gender of the person as set at construction time.
Definition: personbase.h:50
bool hasDied() const
Returns a flag indicating if the person has died.
Definition: personbase.h:62
std::string getName() const
Returns a name with which the person can be identified.
Definition: personbase.h:53
This class provides functions for a population-based simulation using the modified Next Reaction Meth...
Definition: population.h:83
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:56
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:65
double getTimeOfDeath() const
Retrieves the time of death of the person, negative meaning that the person is still alive...
Definition: personbase.h:68