Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps::RiskFactorModule Class Referencefinal

Defines the risk factors module container to hold risk factor models. More...

#include <riskfactor.h>

Inheritance diagram for hgps::RiskFactorModule:
[legend]
Collaboration diagram for hgps::RiskFactorModule:
[legend]

Public Member Functions

 RiskFactorModule ()=delete
 
 RiskFactorModule (std::map< RiskFactorModelType, std::unique_ptr< RiskFactorModel > > models)
 Initialises a new instance of the RiskFactorModule class.
 
SimulationModuleType type () const noexcept override
 Gets the module type identifier.
 
const std::string & name () const noexcept override
 Gets the module name.
 
std::size_t size () const noexcept override
 Gets the number of diseases model hosted.
 
bool contains (const RiskFactorModelType &model_type) const noexcept override
 Indicates whether the host contains a model of type.
 
RiskFactorModelat (const RiskFactorModelType &model_type) const
 
void initialise_population (RuntimeContext &context) override
 Initialises the virtual population.
 
void update_population (RuntimeContext &context) override
 Updates the virtual population status.
 
- Public Member Functions inherited from hgps::SimulationModule
virtual ~SimulationModule ()=default
 Destroys a SimulationModule instance.
 

Detailed Description

Defines the risk factors module container to hold risk factor models.

Constructor & Destructor Documentation

◆ RiskFactorModule() [1/2]

hgps::RiskFactorModule::RiskFactorModule ( )
delete

◆ RiskFactorModule() [2/2]

hgps::RiskFactorModule::RiskFactorModule ( std::map< RiskFactorModelType, std::unique_ptr< RiskFactorModel > >  models)

Initialises a new instance of the RiskFactorModule class.

Parameters
modelsCollection of model instances
Exceptions
std::invalid_argumentfor empty models collection or missing module type.
std::out_of_rangefor model type and model instance type mismatch.

Member Function Documentation

◆ at()

RiskFactorModel & hgps::RiskFactorModule::at ( const RiskFactorModelType model_type) const

◆ contains()

bool hgps::RiskFactorModule::contains ( const RiskFactorModelType modelType) const
overridevirtualnoexcept

Indicates whether the host contains a model of type.

Parameters
modelTypeThe model type identifier
Returns
true if the model is found, otherwise false.

Implements hgps::RiskFactorHostModule.

◆ initialise_population()

void hgps::RiskFactorModule::initialise_population ( RuntimeContext context)
overridevirtual

Initialises the virtual population.

Parameters
contextThe simulation shared runtime context instance

Implements hgps::SimulationModule.

◆ name()

const std::string & hgps::RiskFactorModule::name ( ) const
overridevirtualnoexcept

Gets the module name.

Returns
The human-readable module name

Implements hgps::SimulationModule.

◆ size()

std::size_t hgps::RiskFactorModule::size ( ) const
overridevirtualnoexcept

Gets the number of diseases model hosted.

Returns
Number of hosted diseases models

Implements hgps::RiskFactorHostModule.

◆ type()

SimulationModuleType hgps::RiskFactorModule::type ( ) const
overridevirtualnoexcept

Gets the module type identifier.

Returns
The module type identifier

Implements hgps::SimulationModule.

◆ update_population()

void hgps::RiskFactorModule::update_population ( RuntimeContext context)
overridevirtual

Updates the virtual population status.

Parameters
contextThe simulation run-time context

Implements hgps::UpdatableModule.


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