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

Weight classification model polymorphic wrapper class. More...

#include <weight_model.h>

Public Member Functions

template<typename T>
 WeightModel (T &&value)
 Initialises a new instance of the WeightModel class.
 WeightModel (const WeightModel &other)
 Constructs the WeightModel with the copy of the other's contents.
WeightModel & operator= (const WeightModel &other)
 Replaces the WeightModel with a copy of the other's contents.
 WeightModel (WeightModel &&other)=default
 Constructs the WeightModel with the contents of other using move semantics.
WeightModel & operator= (WeightModel &&other)=default
 Replaces the WeightModel contents with the other using move semantics.
unsigned int child_cutoff_age () const noexcept
 Gets the children cut-off age (before adult).
WeightCategory classify_weight (const Person &person) const
 Classify a person weight according with the predefined categories.
double adjust_risk_factor_value (const Person &entity, const core::Identifier &risk_factor_key, double value) const
 Adjust a Person risk factor value.

Detailed Description

Weight classification model polymorphic wrapper class.

Constructor & Destructor Documentation

◆ WeightModel() [1/3]

template<typename T>
hgps::WeightModel::WeightModel ( T && value)
inline

Initialises a new instance of the WeightModel class.

Template Parameters
TWeight model type
Parameters
valueThe weight model instance
Here is the caller graph for this function:

◆ WeightModel() [2/3]

hgps::WeightModel::WeightModel ( const WeightModel & other)
inline

Constructs the WeightModel with the copy of the other's contents.

Parameters
otherThe other WeightModel instance to copy
Here is the call graph for this function:

◆ WeightModel() [3/3]

hgps::WeightModel::WeightModel ( WeightModel && other)
default

Constructs the WeightModel with the contents of other using move semantics.

Parameters
otherThe other WeightModel instance to move
Here is the call graph for this function:

Member Function Documentation

◆ adjust_risk_factor_value()

double hgps::WeightModel::adjust_risk_factor_value ( const Person & entity,
const core::Identifier & risk_factor_key,
double value ) const
inline

Adjust a Person risk factor value.

Parameters
entityThe Person instance to adjust
risk_factor_keyThe risk factor identifier
valueThe amount of adjustment value
Returns
The adjusted risk factor value
Exceptions
std::out_of_rangefor unknown weight category definition

◆ child_cutoff_age()

unsigned int hgps::WeightModel::child_cutoff_age ( ) const
inlinenoexcept

Gets the children cut-off age (before adult).

Returns
The cut-off age for children

◆ classify_weight()

WeightCategory hgps::WeightModel::classify_weight ( const Person & person) const
inline

Classify a person weight according with the predefined categories.

Parameters
personThe Person instance to classify
Returns
The respective weight classification

◆ operator=() [1/2]

WeightModel & hgps::WeightModel::operator= ( const WeightModel & other)
inline

Replaces the WeightModel with a copy of the other's contents.

Parameters
otherThe other WeightModel instance to copy
Returns
This instance
Here is the call graph for this function:

◆ operator=() [2/2]

WeightModel & hgps::WeightModel::operator= ( WeightModel && other)
default

Replaces the WeightModel contents with the other using move semantics.

Parameters
otherThe other WeightModel instance to move
Returns
This instance
Here is the call graph for this function:

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