Stride Reference Manual  1.0
stride::Health Class Reference

#include <Health.h>

Collaboration diagram for stride::Health:
Collaboration graph

Public Member Functions

 Health (unsigned int start_infectiousness, unsigned int start_symptomatic, unsigned int time_infectious, unsigned int time_symptomatic)
 
HealthStatus getHealthStatus () const
 
unsigned int getEndInfectiousness () const
 
unsigned int getEndSymptomatic () const
 
unsigned int getStartInfectiousness () const
 
unsigned int getStartSymptomatic () const
 
bool isImmune () const
 
bool isInfected () const
 
bool isInfectious () const
 
bool isRecovered () const
 
bool isSusceptible () const
 Is this person susceptible? More...
 
bool isSymptomatic () const
 Is this person symptomatic? More...
 
void setImmune ()
 Set immune to true. More...
 
void startInfection ()
 Start the infection. More...
 
void stopInfection ()
 Stop the infection. More...
 
void update ()
 Update progress of the disease. More...
 

Private Member Functions

unsigned int getDiseaseCounter () const
 Get the disease counter. More...
 
void incrementDiseaseCounter ()
 Increment disease counter. More...
 
void resetDiseaseCounter ()
 Reset the disease counter. More...
 

Private Attributes

unsigned int m_disease_counter
 The disease counter. More...
 
HealthStatus m_status
 The current status of the person w.r.t. the disease. More...
 
unsigned int m_start_infectiousness
 Days after infection to become infectious. More...
 
unsigned int m_start_symptomatic
 Days after infection to become symptomatic. More...
 
unsigned int m_end_infectiousness
 Days after infection to end infectious state. More...
 
unsigned int m_end_symptomatic
 Days after infection to end symptomatic state. More...
 

Friends

class Hdf5Loader
 
class Hdf5Saver
 

Detailed Description

Definition at line 25 of file Health.h.

Constructor & Destructor Documentation

stride::Health::Health ( unsigned int  start_infectiousness,
unsigned int  start_symptomatic,
unsigned int  time_infectious,
unsigned int  time_symptomatic 
)

Definition at line 23 of file Health.cpp.

References m_end_infectiousness, m_end_symptomatic, and stride::Susceptible.

Member Function Documentation

HealthStatus stride::Health::getHealthStatus ( ) const
inline

Definition at line 32 of file Health.h.

unsigned int stride::Health::getEndInfectiousness ( ) const
inline

Definition at line 35 of file Health.h.

unsigned int stride::Health::getEndSymptomatic ( ) const
inline

Definition at line 38 of file Health.h.

unsigned int stride::Health::getStartInfectiousness ( ) const
inline

Definition at line 41 of file Health.h.

unsigned int stride::Health::getStartSymptomatic ( ) const
inline

Definition at line 44 of file Health.h.

bool stride::Health::isImmune ( ) const
inline

Definition at line 47 of file Health.h.

References stride::Immune.

bool stride::Health::isInfected ( ) const
inline
bool stride::Health::isInfectious ( ) const
inline

Definition at line 58 of file Health.h.

References stride::Infectious, and stride::InfectiousAndSymptomatic.

bool stride::Health::isRecovered ( ) const
inline

Definition at line 64 of file Health.h.

References stride::Recovered.

bool stride::Health::isSusceptible ( ) const
inline

Is this person susceptible?

Definition at line 67 of file Health.h.

References stride::Susceptible.

Referenced by stride::PopulationBuilder::build().

bool stride::Health::isSymptomatic ( ) const
inline

Is this person symptomatic?

Definition at line 70 of file Health.h.

References stride::InfectiousAndSymptomatic, and stride::Symptomatic.

void stride::Health::setImmune ( )
void stride::Health::startInfection ( )

Start the infection.

Definition at line 39 of file Health.cpp.

References stride::Exposed, m_status, and resetDiseaseCounter().

Referenced by stride::PopulationBuilder::build().

void stride::Health::stopInfection ( )

Stop the infection.

Definition at line 47 of file Health.cpp.

References stride::Exposed, stride::Infectious, stride::InfectiousAndSymptomatic, m_status, stride::Recovered, and stride::Symptomatic.

Referenced by update().

unsigned int stride::Health::getDiseaseCounter ( ) const
inlineprivate

Get the disease counter.

Definition at line 89 of file Health.h.

Referenced by update().

void stride::Health::incrementDiseaseCounter ( )
inlineprivate

Increment disease counter.

Definition at line 92 of file Health.h.

Referenced by update().

void stride::Health::resetDiseaseCounter ( )
inlineprivate

Reset the disease counter.

Definition at line 95 of file Health.h.

Referenced by startInfection().

Friends And Related Function Documentation

friend class Hdf5Loader
friend

Definition at line 107 of file Health.h.

friend class Hdf5Saver
friend

Definition at line 109 of file Health.h.

Member Data Documentation

unsigned int stride::Health::m_disease_counter
private

The disease counter.

Definition at line 98 of file Health.h.

HealthStatus stride::Health::m_status
private

The current status of the person w.r.t. the disease.

Definition at line 99 of file Health.h.

Referenced by setImmune(), startInfection(), stopInfection(), and update().

unsigned int stride::Health::m_start_infectiousness
private

Days after infection to become infectious.

Definition at line 101 of file Health.h.

Referenced by setImmune(), and update().

unsigned int stride::Health::m_start_symptomatic
private

Days after infection to become symptomatic.

Definition at line 102 of file Health.h.

Referenced by setImmune(), and update().

unsigned int stride::Health::m_end_infectiousness
private

Days after infection to end infectious state.

Definition at line 103 of file Health.h.

Referenced by Health(), setImmune(), and update().

unsigned int stride::Health::m_end_symptomatic
private

Days after infection to end symptomatic state.

Definition at line 104 of file Health.h.

Referenced by Health(), setImmune(), and update().


The documentation for this class was generated from the following files: