Stride Reference Manual  - generated for commit 9643b11
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stride::Health Class Reference

Holds a person's health data. More...

#include <Health.h>

Collaboration diagram for stride::Health:
Collaboration graph

Public Member Functions

 Health (unsigned short int start_infectiousness=0U, unsigned int short start_symptomatic=0U, unsigned short int time_infectious=0U, unsigned short int time_symptomatic=0U)
 
unsigned short int GetEndInfectiousness () const
 
unsigned short int GetEndSymptomatic () const
 
unsigned short int GetStartInfectiousness () const
 
unsigned short int GetStartSymptomatic () const
 
bool IsImmune () const
 Is this person immune? More...
 
bool IsInfected () const
 Is this person infected? More...
 
bool IsInfectious () const
 Is this person infectious. More...
 
bool IsRecovered () const
 Is this person recovered? More...
 
bool IsSusceptible () const
 Is this person susceptible? More...
 
bool IsSymptomatic () const
 Is this person symptomatic? More...
 
bool SymptomsStartedToday () const
 Have the symptoms started today? More...
 
void SetImmune ()
 Set health state to immune. More...
 
void SetSusceptible ()
 Set health state to susceptible. 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 short int GetDiseaseCounter () const
 Get the disease counter. More...
 
void IncrementDiseaseCounter ()
 Increment disease counter. More...
 
void ResetDiseaseCounter ()
 Reset the disease counter. More...
 

Private Attributes

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

Detailed Description

Holds a person's health data.

Definition at line 38 of file Health.h.

Constructor & Destructor Documentation

stride::Health::Health ( unsigned short int  start_infectiousness = 0U,
unsigned int short  start_symptomatic = 0U,
unsigned short int  time_infectious = 0U,
unsigned short int  time_symptomatic = 0U 
)
explicit

Definition at line 27 of file Health.cpp.

References stride::Susceptible.

Member Function Documentation

unsigned short int stride::Health::GetEndInfectiousness ( ) const
inline

Definition at line 46 of file Health.h.

unsigned short int stride::Health::GetEndSymptomatic ( ) const
inline

Definition at line 49 of file Health.h.

unsigned short int stride::Health::GetStartInfectiousness ( ) const
inline

Definition at line 52 of file Health.h.

unsigned short int stride::Health::GetStartSymptomatic ( ) const
inline

Definition at line 55 of file Health.h.

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

Is this person immune?

Definition at line 58 of file Health.h.

References stride::Immune.

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

Is this person infected?

Definition at line 61 of file Health.h.

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

Referenced by StopInfection(), and Update().

Here is the caller graph for this function:

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

Is this person infectious.

Definition at line 68 of file Health.h.

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

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

Is this person recovered?

Definition at line 74 of file Health.h.

References stride::Recovered.

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

Is this person susceptible?

Definition at line 77 of file Health.h.

References stride::Susceptible.

Referenced by stride::Immunizer::Cocoon(), and stride::DiseaseSeeder::Seed().

Here is the caller graph for this function:

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

Is this person symptomatic?

Definition at line 80 of file Health.h.

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

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

Have the symptoms started today?

Definition at line 86 of file Health.h.

void stride::Health::SetImmune ( )
inline

Set health state to immune.

Definition at line 89 of file Health.h.

References stride::Immune.

Referenced by stride::Immunizer::Cocoon().

Here is the caller graph for this function:

void stride::Health::SetSusceptible ( )
inline

Set health state to susceptible.

Definition at line 92 of file Health.h.

References stride::Susceptible.

void stride::Health::StartInfection ( )

Start the infection.

Definition at line 35 of file Health.cpp.

References AssertThrow, stride::Exposed, m_status, ResetDiseaseCounter(), and stride::Susceptible.

Referenced by stride::Infector< LL, TIC, true >::Exec(), and stride::DiseaseSeeder::Seed().

Here is the call graph for this function:

Here is the caller graph for this function:

void stride::Health::StopInfection ( )

Stop the infection.

Definition at line 42 of file Health.cpp.

References AssertThrow, IsInfected(), m_status, and stride::Recovered.

Referenced by Update().

Here is the call graph for this function:

Here is the caller graph for this function:

void stride::Health::Update ( )
unsigned short int stride::Health::GetDiseaseCounter ( ) const
inlineprivate

Get the disease counter.

Definition at line 105 of file Health.h.

Referenced by Update().

Here is the caller graph for this function:

void stride::Health::IncrementDiseaseCounter ( )
inlineprivate

Increment disease counter.

Definition at line 108 of file Health.h.

Referenced by Update().

Here is the caller graph for this function:

void stride::Health::ResetDiseaseCounter ( )
inlineprivate

Reset the disease counter.

Definition at line 111 of file Health.h.

Referenced by StartInfection().

Here is the caller graph for this function:

Member Data Documentation

unsigned short int stride::Health::m_disease_counter
private

The disease counter.

Definition at line 114 of file Health.h.

HealthStatus stride::Health::m_status
private

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

Definition at line 115 of file Health.h.

Referenced by StartInfection(), StopInfection(), and Update().

unsigned short int stride::Health::m_start_infectiousness
private

Days after infection to become infectious.

Definition at line 117 of file Health.h.

Referenced by Update().

unsigned short int stride::Health::m_start_symptomatic
private

Days after infection to become symptomatic.

Definition at line 118 of file Health.h.

Referenced by Update().

unsigned short int stride::Health::m_end_infectiousness
private

Days after infection to end infectious state.

Definition at line 119 of file Health.h.

Referenced by Update().

unsigned short int stride::Health::m_end_symptomatic
private

Days after infection to end symptomatic state.

Definition at line 120 of file Health.h.

Referenced by Update().


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