This is the base class for a person in a population-based simulation.
More...
#include <personbase.h>
Inherited by GlobalEventDummyPerson.
|
Gender | getGender () const |
| Returns the gender of the person as set at construction time. More...
|
|
std::string | getName () const |
| Returns a name with which the person can be identified. More...
|
|
double | getDateOfBirth () const |
| Returns the time at which the person was born, as specified in the constructor. More...
|
|
double | getAgeAt (double t0) const |
| Returns the age of the person at time t0 . More...
|
|
bool | hasDied () const |
| Returns a flag indicating if the person has died. More...
|
|
void | setTimeOfDeath (double t) |
| Marks the person as deceased and stores the specified time of death. More...
|
|
double | getTimeOfDeath () const |
| Retrieves the time of death of the person, negative meaning that the person is still alive. More...
|
|
void | setAlgorithmInfo (PersonAlgorithmInfo *pAlgInfo) |
| This is only meant to be used by the implementation of an algorithm, and allows you to store algorithm-specific data for each person (gets deleted automatically in the destructor). More...
|
|
PersonAlgorithmInfo * | getAlgorithmInfo () const |
| Returns what was stored using PersonBase::PersonAlgorithmInfo. More...
|
|
|
| PersonBase (Gender g, double dateOfBirth) |
| Create a new person of gender g and which was born at the specified time in the simulation. More...
|
|
This is the base class for a person in a population-based simulation.
Such a simulation uses an algorithm derived from PopulationAlgorithmInterface and a state derived from PopulationStateInterface. It is not mean to be used directly, but provides some common functions for a class which should derive from it.
The gender of a person.
Enumerator |
---|
Male |
The person is a man.
|
Female |
The person is a woman.
|
PersonBase::PersonBase |
( |
Gender |
g, |
|
|
double |
dateOfBirth |
|
) |
| |
|
protected |
Create a new person of gender g
and which was born at the specified time in the simulation.
Although scheduled events must always use positive times, the time describing the birth date may be negative to set a certain age of the person when the simulation starts at .
double PersonBase::getAgeAt |
( |
double |
t0 | ) |
const |
|
inline |
Returns the age of the person at time t0
.
Returns what was stored using PersonBase::PersonAlgorithmInfo.
double PersonBase::getDateOfBirth |
( |
| ) |
const |
|
inline |
Returns the time at which the person was born, as specified in the constructor.
Gender PersonBase::getGender |
( |
| ) |
const |
|
inline |
Returns the gender of the person as set at construction time.
std::string PersonBase::getName |
( |
| ) |
const |
|
inline |
Returns a name with which the person can be identified.
double PersonBase::getTimeOfDeath |
( |
| ) |
const |
|
inline |
Retrieves the time of death of the person, negative meaning that the person is still alive.
bool PersonBase::hasDied |
( |
| ) |
const |
|
inline |
Returns a flag indicating if the person has died.
This is only meant to be used by the implementation of an algorithm, and allows you to store algorithm-specific data for each person (gets deleted automatically in the destructor).
void PersonBase::setTimeOfDeath |
( |
double |
t | ) |
|
|
inline |
Marks the person as deceased and stores the specified time of death.
The documentation for this class was generated from the following files: